Dmitry Torokhov wrote: > On Wed, Jan 28, 2009 at 10:53:58PM +0100, Roel Kluin wrote: >> scan pci_bus_type rather then a get/put >> >> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx> > > 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 <roel.kluin@xxxxxxxxx> --- diff --git a/drivers/input/mouse/pc110pad.c b/drivers/input/mouse/pc110pad.c index fd09c8d..3941f97 100644 --- a/drivers/input/mouse/pc110pad.c +++ b/drivers/input/mouse/pc110pad.c @@ -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", -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html