Re: [PATCH] Update pcips2 driver

From: Andrew Morton
Date: Mon Jul 12 2004 - 15:27:43 EST


Russell King <rmk+lkml@xxxxxxxxxxxxxxxx> wrote:
>
> Use pci_request_regions()/pci_release_regions() instead of
> request_region()/release_region()

Some of this patch is already in Vojtech's tree. If it's not critical,
perhaps it would be best if he took the remaining bit:


From: Russell King <rmk+lkml@xxxxxxxxxxxxxxxx>

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

Signed-off-by: Russell King <rmk@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

25-akpm/./drivers/input/serio/pcips2.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)

diff -puN ./drivers/input/serio/pcips2.c~update-pcips2-driver ./drivers/input/serio/pcips2.c
--- 25/./drivers/input/serio/pcips2.c~update-pcips2-driver Mon Jul 12 13:25:01 2004
+++ 25-akpm/./drivers/input/serio/pcips2.c Mon Jul 12 13:25:01 2004
@@ -134,13 +134,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);
serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/