Skip to content

Commit

Permalink
Input: pc110pad - use no_pci_devices()
Browse files Browse the repository at this point in the history
Use no_pci_devices() helper instead of doing explicit get/put.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Roel Kluin authored and Dmitry Torokhov committed Jan 30, 2009
1 parent 03dd5e1 commit b0ee0d3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/input/mouse/pc110pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b0ee0d3

Please sign in to comment.