Commit 23abae88 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: addi_common.h: rename boardinfo 'pc_DriverName'

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dd276202
......@@ -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 */
......
......@@ -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);
......
......@@ -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 {
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment