public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
	Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Update pcips2 driver
Date: Mon, 12 Jul 2004 15:42:07 +0100	[thread overview]
Message-ID: <20040712154207.A15469@flint.arm.linux.org.uk> (raw)

Use pci_request_regions()/pci_release_regions() instead of
request_region()/release_region()

Signed-off-by: Russell King <rmk@arm.linux.org.uk>

diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x *.orig -x *.rej orig/./drivers/input/serio/pcips2.c linux/./drivers/input/serio/pcips2.c
--- orig/./drivers/input/serio/pcips2.c	Thu Sep  4 16:37:05 2003
+++ linux/./drivers/input/serio/pcips2.c	Sat Aug 23 10:10:57 2003
@@ -133,13 +133,11 @@ static int __devinit pcips2_probe(struct
 
 	ret = pci_enable_device(dev);
 	if (ret)
-		return ret;
+		goto out;
 
-	if (!request_region(pci_resource_start(dev, 0),
-			    pci_resource_len(dev, 0), "pcips2")) {
-		ret = -EBUSY;
+	ret = pci_request_regions(dev, "pcips2");
+	if (ret)
 		goto disable;
-	}
 
 	ps2if = kmalloc(sizeof(struct pcips2_data), GFP_KERNEL);
 	if (!ps2if) {
@@ -165,10 +163,10 @@ static int __devinit pcips2_probe(struct
 	return 0;
 
  release:
-	release_region(pci_resource_start(dev, 0),
-		       pci_resource_len(dev, 0));
+	pci_release_regions(dev);
  disable:
 	pci_disable_device(dev);
+ out:
 	return ret;
 }
 
@@ -177,10 +175,9 @@ static void __devexit pcips2_remove(stru
 	struct pcips2_data *ps2if = pci_get_drvdata(dev);
 
 	serio_unregister_port(&ps2if->io);
-	release_region(pci_resource_start(dev, 0),
-		       pci_resource_len(dev, 0));
 	pci_set_drvdata(dev, NULL);
 	kfree(ps2if);
+	pci_release_regions(dev);
 	pci_disable_device(dev);
 }
 

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

             reply	other threads:[~2004-07-12 14:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-12 14:42 Russell King [this message]
2004-07-12 20:25 ` [PATCH] Update pcips2 driver Andrew Morton
2004-07-12 21:55   ` Russell King
2004-07-13 11:55     ` Vojtech Pavlik

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=20040712154207.A15469@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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