Skip to content

Commit

Permalink
staging/comedi/adl: Convert pci_table entries to PCI_DEVICE (if PCI_A…
Browse files Browse the repository at this point in the history
…NY_ID is used)

This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Peter Huewe authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent 71d4c80 commit 8c0690e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 25 deletions.
10 changes: 1 addition & 9 deletions drivers/staging/comedi/drivers/adl_pci7230.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@ Configuration Options:
#define PCI_DEVICE_ID_PCI7230 0x7230

static DEFINE_PCI_DEVICE_TABLE(adl_pci7230_pci_table) = {
{
PCI_VENDOR_ID_ADLINK,
PCI_DEVICE_ID_PCI7230,
PCI_ANY_ID,
PCI_ANY_ID,
0,
0,
0
},
{ PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI_DEVICE_ID_PCI7230) },
{0}
};

Expand Down
6 changes: 2 additions & 4 deletions drivers/staging/comedi/drivers/adl_pci7296.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ Configuration Options:
#define PCI_DEVICE_ID_PCI7296 0x7296

static DEFINE_PCI_DEVICE_TABLE(adl_pci7296_pci_table) = {
{
PCI_VENDOR_ID_ADLINK, PCI_DEVICE_ID_PCI7296, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0}, {
0}
{ PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI_DEVICE_ID_PCI7296) },
{0}
};

MODULE_DEVICE_TABLE(pci, adl_pci7296_pci_table);
Expand Down
6 changes: 2 additions & 4 deletions drivers/staging/comedi/drivers/adl_pci7432.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ Configuration Options:
#define PCI_DEVICE_ID_PCI7432 0x7432

static DEFINE_PCI_DEVICE_TABLE(adl_pci7432_pci_table) = {
{
PCI_VENDOR_ID_ADLINK, PCI_DEVICE_ID_PCI7432, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0}, {
0}
{ PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI_DEVICE_ID_PCI7432) },
{0}
};

MODULE_DEVICE_TABLE(pci, adl_pci7432_pci_table);
Expand Down
6 changes: 2 additions & 4 deletions drivers/staging/comedi/drivers/adl_pci8164.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ Configuration Options:
#define PCI_DEVICE_ID_PCI8164 0x8164

static DEFINE_PCI_DEVICE_TABLE(adl_pci8164_pci_table) = {
{
PCI_VENDOR_ID_ADLINK, PCI_DEVICE_ID_PCI8164, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0}, {
0}
{ PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI_DEVICE_ID_PCI8164) },
{0}
};

MODULE_DEVICE_TABLE(pci, adl_pci8164_pci_table);
Expand Down
6 changes: 2 additions & 4 deletions drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,8 @@ static const struct comedi_lrange pci9111_hr_ai_range = {
};

static DEFINE_PCI_DEVICE_TABLE(pci9111_pci_table) = {
{ PCI_VENDOR_ID_ADLINK, PCI9111_HR_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,
0, 0, 0 },
/* { PCI_VENDOR_ID_ADLINK, PCI9111_HG_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,
* 0, 0, 0 }, */
{ PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI9111_HR_DEVICE_ID) },
/* { PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI9111_HG_DEVICE_ID) }, */
{ 0 }
};

Expand Down

0 comments on commit 8c0690e

Please sign in to comment.