Input: scan pci_bus_type
Subsystems (2)
PATCH 1/1 Input: scan pci_bus_type
scan pci_bus_type rather then a get/put
Signed-off-by Roel Kluin <[email protected]>
---
drivers/input/mouse/pc110pad.c +1 -4
@@ -111,11 +111,8 @@ static int __init pc110pad_init(void)struct pci_dev *dev;int err; - dev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID ,NULL ); -if (dev) { -pci_dev_put (dev); +if (!no_pci_devices ())return -ENODEV ; - }if (!request_region (pc110pad_io,4 ,"pc110pad" )) { printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n",
Quoted 3 lines · Roel Kluin
scan
pci_bus_typerather then a get/putSigned-off-by Roel Kluin <[email protected]>
Applied to by 'next' branch, thank you Roel.
Signature · 1 line
Dmitry
Quoted 7 lines · Dmitry Torokhov
Quoted 3 lines · Roel Kluin
scan
pci_bus_typerather then a get/putSigned-off-by Roel Kluin <[email protected]>Applied to by 'next' branch, thank you Roel.
A bit better is this patch, since struct pci_dev *dev isn't used anywhere else in this function. ------------------->8--------------8<---------------------- scan pci_bus_type rather then a get/put
Signed-off-by Roel Kluin <[email protected]>
---
drivers/input/mouse/pc110pad.c +1 -5
@@ -108,14 +108,10 @@ static int pc110pad_open(struct input_dev *dev)*/ static int __init pc110pad_init (void ) { -struct pci_dev *dev;int err; - dev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID ,NULL ); -if (dev) { -pci_dev_put (dev); +if (!no_pci_devices ())return -ENODEV ; - }if (!request_region (pc110pad_io,4 ,"pc110pad" )) { printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n",