diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-03-05 10:22:06 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-11 10:05:22 -0700 |
commit | 151df466b681181bc1b0543df79620d4e805e531 (patch) | |
tree | f6191c6908b9e2d96fd764494e9d7f902d7db594 /drivers | |
parent | b3322d422e65bcfd0a70444c9a0f240aaa8d0b07 (diff) | |
download | lwn-151df466b681181bc1b0543df79620d4e805e531.tar.gz lwn-151df466b681181bc1b0543df79620d4e805e531.zip |
staging: comedi: skel: cleanup pci_driver declaration
For aesthetic reasons, add some whitespace to the pci_driver
declaration.
Also, move the pci device table near the pci_driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/skel.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/staging/comedi/drivers/skel.c b/drivers/staging/comedi/drivers/skel.c index 8cedc4cf020c..53bbe9e5f98b 100644 --- a/drivers/staging/comedi/drivers/skel.c +++ b/drivers/staging/comedi/drivers/skel.c @@ -689,11 +689,22 @@ static struct comedi_driver skel_driver = { #ifdef CONFIG_COMEDI_PCI_DRIVERS -/* This is used by modprobe to translate PCI IDs to drivers. Should - * only be used for PCI and ISA-PnP devices */ -/* Please add your PCI vendor ID to comedidev.h, and it will be forwarded - * upstream. */ -#define PCI_VENDOR_ID_SKEL 0xdafe +static int skel_pci_probe(struct pci_dev *dev, + const struct pci_device_id *id) +{ + return comedi_pci_auto_config(dev, &skel_driver, id->driver_data); +} + +/* + * Please add your PCI vendor ID to comedidev.h, and it will + * be forwarded upstream. + */ +#define PCI_VENDOR_ID_SKEL 0xdafe + +/* + * This is used by modprobe to translate PCI IDs to drivers. + * Should only be used for PCI and ISA-PnP devices + */ static DEFINE_PCI_DEVICE_TABLE(skel_pci_table) = { { PCI_DEVICE(PCI_VENDOR_ID_SKEL, 0x0100) }, { PCI_DEVICE(PCI_VENDOR_ID_SKEL, 0x0200) }, @@ -701,16 +712,10 @@ static DEFINE_PCI_DEVICE_TABLE(skel_pci_table) = { }; MODULE_DEVICE_TABLE(pci, skel_pci_table); -static int skel_pci_probe(struct pci_dev *dev, - const struct pci_device_id *id) -{ - return comedi_pci_auto_config(dev, &skel_driver, id->driver_data); -} - static struct pci_driver skel_pci_driver = { - .name = "dummy", - .id_table = skel_pci_table, - .probe = &skel_pci_probe, + .name = "dummy", + .id_table = skel_pci_table, + .probe = skel_pci_probe, .remove = comedi_pci_auto_unconfig, }; module_comedi_pci_driver(skel_driver, skel_pci_driver); |