linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roel Kluin <roel.kluin@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: scan pci_bus_type
Date: Mon, 02 Feb 2009 14:44:31 +0100	[thread overview]
Message-ID: <4986F8BF.9000102@gmail.com> (raw)
In-Reply-To: <20090130071021.GB3481@dtor-d630.eng.vmware.com>

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@gmail.com>
> 
> 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@gmail.com>
---
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",

      reply	other threads:[~2009-02-02 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 21:53 [PATCH] Input: scan pci_bus_type Roel Kluin
2009-01-30  7:10 ` Dmitry Torokhov
2009-02-02 13:44   ` Roel Kluin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4986F8BF.9000102@gmail.com \
    --to=roel.kluin@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).