From cd07fbf27b91c3c71812528ce39f9043ee1352e3 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 12 Aug 2015 13:25:43 -0700 Subject: [PATCH] staging: comedi: addi_apci_3501: rename private data 'i_IobaseAmcc' Rename this CamelCase member of the private data. Also, fix the type of the member, it holds a pci_resource_start() address and should be an unsigned long. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_3501.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index 6dd7e3d22dc5..c3a1acdd3070 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -72,7 +72,7 @@ #define EEPROM_TIMER_WATCHDOG_COUNTER 10 struct apci3501_private { - int i_IobaseAmcc; + unsigned long amcc; struct task_struct *tsk_Current; unsigned char timer_mode; }; @@ -222,11 +222,10 @@ static unsigned short apci3501_eeprom_readw(unsigned long iobase, static int apci3501_eeprom_get_ao_n_chan(struct comedi_device *dev) { struct apci3501_private *devpriv = dev->private; - unsigned long iobase = devpriv->i_IobaseAmcc; unsigned char nfuncs; int i; - nfuncs = apci3501_eeprom_readw(iobase, 10) & 0xff; + nfuncs = apci3501_eeprom_readw(devpriv->amcc, 10) & 0xff; /* Read functionality details */ for (i = 0; i < nfuncs; i++) { @@ -235,11 +234,11 @@ static int apci3501_eeprom_get_ao_n_chan(struct comedi_device *dev) unsigned char func; unsigned short val; - func = apci3501_eeprom_readw(iobase, 12 + offset) & 0x3f; - addr = apci3501_eeprom_readw(iobase, 14 + offset); + func = apci3501_eeprom_readw(devpriv->amcc, 12 + offset) & 0x3f; + addr = apci3501_eeprom_readw(devpriv->amcc, 14 + offset); if (func == EEPROM_ANALOGOUTPUT) { - val = apci3501_eeprom_readw(iobase, addr + 10); + val = apci3501_eeprom_readw(devpriv->amcc, addr + 10); return (val >> 4) & 0x3ff; } } @@ -254,7 +253,7 @@ static int apci3501_eeprom_insn_read(struct comedi_device *dev, struct apci3501_private *devpriv = dev->private; unsigned short addr = CR_CHAN(insn->chanspec); - data[0] = apci3501_eeprom_readw(devpriv->i_IobaseAmcc, 2 * addr); + data[0] = apci3501_eeprom_readw(devpriv->amcc, 2 * addr); return insn->n; } @@ -335,7 +334,7 @@ static int apci3501_auto_attach(struct comedi_device *dev, return ret; dev->iobase = pci_resource_start(pcidev, 1); - devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0); + devpriv->amcc = pci_resource_start(pcidev, 0); ao_n_chan = apci3501_eeprom_get_ao_n_chan(dev); -- 2.20.1