소스 검색

Input: pc110pad - use no_pci_devices()

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>
Roel Kluin 16 년 전
부모
커밋
b0ee0d3eb3
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      drivers/input/mouse/pc110pad.c

+ 1 - 4
drivers/input/mouse/pc110pad.c

@@ -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",