mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mfd: ezx-pcap: Use spi_get_drvdata() and spi_set_drvdata()
Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
1b1ba09c39
commit
7c478b4058
1 changed files with 2 additions and 2 deletions
|
|
@ -393,7 +393,7 @@ static int pcap_add_subdev(struct pcap_chip *pcap,
|
|||
|
||||
static int ezx_pcap_remove(struct spi_device *spi)
|
||||
{
|
||||
struct pcap_chip *pcap = dev_get_drvdata(&spi->dev);
|
||||
struct pcap_chip *pcap = spi_get_drvdata(spi);
|
||||
struct pcap_platform_data *pdata = spi->dev.platform_data;
|
||||
int i, adc_irq;
|
||||
|
||||
|
|
@ -439,7 +439,7 @@ static int ezx_pcap_probe(struct spi_device *spi)
|
|||
mutex_init(&pcap->adc_mutex);
|
||||
INIT_WORK(&pcap->isr_work, pcap_isr_work);
|
||||
INIT_WORK(&pcap->msr_work, pcap_msr_work);
|
||||
dev_set_drvdata(&spi->dev, pcap);
|
||||
spi_set_drvdata(spi, pcap);
|
||||
|
||||
/* setup spi */
|
||||
spi->bits_per_word = 32;
|
||||
|
|
|
|||
Loading…
Reference in a new issue