2003-05-06 21:06:07

by Bongani Hlope

[permalink] [raw]
Subject: [PATCH][2.5.69][PNP] Remove deprecated __check_region

Hi Adam

You are listed as the maintainer of the ISAPNP code in the Maintainers file.
Could you verify if this patch is fine and forward it to Linus. The patch
has been test for compilation.

Thanx

-- Bongani

--- linux-2.5/drivers/pnp/resource.c.orig 2003-05-06 22:43:52.000000000 +0200
+++ linux-2.5/drivers/pnp/resource.c 2003-05-06 22:51:41.000000000 +0200
@@ -295,7 +295,7 @@

/* check if the resource is already in use, skip if the device is active because it itself may be in use */
if(!dev->active) {
- if (check_region(*port, length(port,end)))
+ if (!request_region(*port, length(port,end), "pnp"))
return CONFLICT_TYPE_IN_USE;
}

@@ -366,7 +366,7 @@

/* check if the resource is already in use, skip if the device is active because it itself may be in use */
if(!dev->active) {
- if (__check_region(&iomem_resource, *addr, length(addr,end)))
+ if (!__request_region(&iomem_resource, *addr, length(addr,end), "pnp"))
return CONFLICT_TYPE_IN_USE;
}


Attachments:
(No filename) (189.00 B)

2003-05-06 21:30:25

by Alan

[permalink] [raw]
Subject: Re: [PATCH][2.5.69][PNP] Remove deprecated __check_region

On Maw, 2003-05-06 at 22:18, Bongani Hlope wrote:
> Hi Adam
>
> You are listed as the maintainer of the ISAPNP code in the Maintainers file.
> Could you verify if this patch is fine and forward it to Linus. The patch
> has been test for compilation.

This isnt what is needed. The PnP code needs to claim with
request_region but also needs to handle giving it back on error. So its
not quite as trivial