staging: comedi: addi_common.h: rename boardinfo 'pc_DriverName'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 14 Oct 2014 17:44:29 +0000 (10:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 07:48:54 +0000 (15:48 +0800)
Rename this CamelCase member of the boardinfo.

The comedi_device 'board_name' is set to this member during the (*auto_attach)
of the addi-data that still use this boardinfo drivers. For aesthetics, use
the dev->board_name instead of the boardinfo in the drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi-data/addi_common.h
drivers/staging/comedi/drivers/addi-data/addi_eeprom.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
drivers/staging/comedi/drivers/addi_apci_035.c
drivers/staging/comedi/drivers/addi_apci_1500.c
drivers/staging/comedi/drivers/addi_apci_3120.c

index b757f460740a8a4b9f43b3252178a000b049607c..9def296568ffe36f1f1080cd7cc01b1a61a87960 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/interrupt.h>
 
 struct addi_board {
-       const char *pc_DriverName;      /*  driver name */
+       const char *name;
        int i_IorangeBase1;
        int i_PCIEeprom;        /*  eeprom present or not */
        char *pc_EepromChip;    /*  type of chip */
index b731856c27da1d6a120d34df8cd8fe04c4ecc6e1..4e3d5ed709908823621006676fc38dff37c358cb 100644 (file)
@@ -287,7 +287,7 @@ static void addi_eeprom_read_ai_info(struct comedi_device *dev,
        /* No of channels for 1st hard component */
        tmp = addi_eeprom_readw(iobase, type, addr + 10);
        devpriv->s_EeParameters.i_NbrAiChannel = (tmp >> 4) & 0x3ff;
-       if (!strcmp(this_board->pc_DriverName, "apci3200"))
+       if (!strcmp(dev->board_name, "apci3200"))
                devpriv->s_EeParameters.i_NbrAiChannel *= 4;
 
        tmp = addi_eeprom_readw(iobase, type, addr + 16);
index ed1d92ecc9ea82eaa1c45d208ceb9918cf83a683..d76435668d9a01f6058cb8a016c8680f8d818821 100644 (file)
@@ -351,7 +351,6 @@ static int apci3120_ai_insn_read(struct comedi_device *dev,
                                 struct comedi_insn *insn,
                                 unsigned int *data)
 {
-       const struct addi_board *this_board = dev->board_ptr;
        struct addi_private *devpriv = dev->private;
        unsigned short us_ConvertTiming, us_TmpValue, i;
        unsigned char b_Tmp;
@@ -382,7 +381,7 @@ static int apci3120_ai_insn_read(struct comedi_device *dev,
 
                /* EL250804: Testing if board APCI3120 have the new Quartz or if it is an APCI3001 */
                if ((us_TmpValue & 0x00B0) == 0x00B0
-                       || !strcmp(this_board->pc_DriverName, "apci3001")) {
+                       || !strcmp(dev->board_name, "apci3001")) {
                        us_ConvertTiming = (us_ConvertTiming * 2) - 2;
                } else {
                        us_ConvertTiming =
@@ -781,7 +780,6 @@ static int apci3120_cyclic_ai(int mode,
                              struct comedi_device *dev,
                              struct comedi_subdevice *s)
 {
-       const struct addi_board *this_board = dev->board_ptr;
        struct addi_private *devpriv = dev->private;
        struct comedi_cmd *cmd = &s->async->cmd;
        unsigned char b_Tmp;
@@ -838,7 +836,7 @@ static int apci3120_cyclic_ai(int mode,
        /* EL241003 Begin: add this section to replace floats calculation by integer calculations */
        /* EL250804: Testing if board APCI3120 have the new Quartz or if it is an APCI3001 */
        if ((us_TmpValue & 0x00B0) == 0x00B0
-               || !strcmp(this_board->pc_DriverName, "apci3001")) {
+               || !strcmp(dev->board_name, "apci3001")) {
                ui_TimerValue0 = ui_ConvertTiming * 2 - 2000;
                ui_TimerValue0 = ui_TimerValue0 / 1000;
 
@@ -1604,7 +1602,6 @@ static int apci3120_config_insn_timer(struct comedi_device *dev,
                                      struct comedi_insn *insn,
                                      unsigned int *data)
 {
-       const struct addi_board *this_board = dev->board_ptr;
        struct addi_private *devpriv = dev->private;
        unsigned int ui_Timervalue2;
        unsigned short us_TmpValue;
@@ -1624,7 +1621,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev,
         * is an APCI3001 and calculate the time value to set in the timer
         */
        if ((us_TmpValue & 0x00B0) == 0x00B0
-               || !strcmp(this_board->pc_DriverName, "apci3001")) {
+               || !strcmp(dev->board_name, "apci3001")) {
                /* Calculate the time value to set in the timer */
                ui_Timervalue2 = ui_Timervalue2 / 50;
        } else {
@@ -1742,7 +1739,6 @@ static int apci3120_write_insn_timer(struct comedi_device *dev,
                                     struct comedi_insn *insn,
                                     unsigned int *data)
 {
-       const struct addi_board *this_board = dev->board_ptr;
        struct addi_private *devpriv = dev->private;
        unsigned int ui_Timervalue2 = 0;
        unsigned short us_TmpValue;
@@ -1862,7 +1858,7 @@ static int apci3120_write_insn_timer(struct comedi_device *dev,
                 * is an APCI3001 and calculate the time value to set in the timer
                 */
                if ((us_TmpValue & 0x00B0) == 0x00B0
-                       || !strcmp(this_board->pc_DriverName, "apci3001")) {
+                       || !strcmp(dev->board_name, "apci3001")) {
                        /* Calculate the time value to set in the timer */
                        ui_Timervalue2 = ui_Timervalue2 / 50;
                } else {
index 3eeb244ef8551e402917d8ab658e2191c75fd788..a5e3d325165a790c2ceac56ebd0f4023834dfdfc 100644 (file)
@@ -14,7 +14,7 @@
 
 static const struct addi_board apci035_boardtypes[] = {
        {
-               .pc_DriverName          = "apci035",
+               .name                   = "apci035",
                .i_IorangeBase1         = APCI035_ADDRESS_RANGE,
                .i_PCIEeprom            = 1,
                .pc_EepromChip          = "S5920",
@@ -57,7 +57,7 @@ static int apci035_auto_attach(struct comedi_device *dev,
        int ret;
 
        dev->board_ptr = &apci035_boardtypes[0];
-       dev->board_name = this_board->pc_DriverName;
+       dev->board_name = this_board->name;
 
        devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
        if (!devpriv)
index 7da0c35d12b1ba7fa82d8859a6cf1a3138de6ad7..03e65a106816512f5dea0f812bbbe16d95eded4e 100644 (file)
@@ -12,7 +12,7 @@
 
 static const struct addi_board apci1500_boardtypes[] = {
        {
-               .pc_DriverName          = "apci1500",
+               .name                   = "apci1500",
                .i_IorangeBase1         = APCI1500_ADDRESS_RANGE,
                .i_PCIEeprom            = 0,
                .i_NbrDiChannel         = 16,
@@ -50,7 +50,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
        int ret;
 
        dev->board_ptr = &apci1500_boardtypes[0];
-       dev->board_name = this_board->pc_DriverName;
+       dev->board_name = this_board->name;
 
        devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
        if (!devpriv)
index 38da44bd4eef8ea1f4cdf81ef2514de6b6e9431d..1fa53cf629fccb3d6ab8b8c55af182af49e0df3e 100644 (file)
@@ -16,7 +16,7 @@ enum apci3120_boardid {
 
 static const struct addi_board apci3120_boardtypes[] = {
        [BOARD_APCI3120] = {
-               .pc_DriverName          = "apci3120",
+               .name                   = "apci3120",
                .i_NbrAiChannel         = 16,
                .i_NbrAiChannelDiff     = 8,
                .i_AiChannelList        = 16,
@@ -28,7 +28,7 @@ static const struct addi_board apci3120_boardtypes[] = {
                .i_DoMaxdata            = 0x0f,
        },
        [BOARD_APCI3001] = {
-               .pc_DriverName          = "apci3001",
+               .name                   = "apci3001",
                .i_NbrAiChannel         = 16,
                .i_NbrAiChannelDiff     = 8,
                .i_AiChannelList        = 16,
@@ -53,7 +53,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
        if (!this_board)
                return -ENODEV;
        dev->board_ptr = this_board;
-       dev->board_name = this_board->pc_DriverName;
+       dev->board_name = this_board->name;
 
        devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
        if (!devpriv)