lkml.org 
[lkml]   [2005]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 2.6.13 - 3/3 - Remove the deprecated function __check_region
Hi all, 

Here is the first patch for kernel 2.6.13 from Linus tree.


--
Stephane Wirtel <stephane.wirtel@belgacom.net>
<stephane.wirtel@gmail.com>


diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -242,6 +242,7 @@ int pnp_check_port(struct pnp_dev * dev,
int tmp;
struct pnp_dev *tdev;
unsigned long *port, *end, *tport, *tend;
+ struct resource *res = 0;
port = &dev->res.port_resource[idx].start;
end = &dev->res.port_resource[idx].end;

@@ -252,8 +253,12 @@ int pnp_check_port(struct pnp_dev * dev,
/* 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(&ioport_resource, *port, length(port,end)))
+ res = __request_region(&ioport_resource, *port, length(port,end), "check-region");
+ if (res) {
+ release_resource (res);
+ kfree (res);
return 0;
+ }
}

/* check if the resource is reserved */
@@ -298,6 +303,7 @@ int pnp_check_mem(struct pnp_dev * dev,
int tmp;
struct pnp_dev *tdev;
unsigned long *addr, *end, *taddr, *tend;
+ struct resource *res = 0;
addr = &dev->res.mem_resource[idx].start;
end = &dev->res.mem_resource[idx].end;

@@ -308,8 +314,12 @@ int pnp_check_mem(struct pnp_dev * dev,
/* 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_mem_region(*addr, length(addr,end)))
+ res == __request_region(&iomem_resource, *addr, length(addr, end), "check-region");
+ if (res) {
+ release_resource (res);
+ kfree (res);
return 0;
+ }
}

/* check if the resource is reserved */
\
 
 \ /
  Last update: 2005-08-30 19:10    [W:0.029 / U:1.056 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site