public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.6.13 - 3/3 - Remove the deprecated function __check_region
@ 2005-08-30 17:08 Stephane Wirtel
  2005-08-30 17:15 ` Stephane Wirtel
  0 siblings, 1 reply; 2+ messages in thread
From: Stephane Wirtel @ 2005-08-30 17:08 UTC (permalink / raw)
  To: Stephane Wirtel; +Cc: Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

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>



[-- Attachment #2: patch_remove_check_region_in_pnp_resource.diff --]
[-- Type: text/plain, Size: 1568 bytes --]

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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] 2.6.13 - 3/3 - Remove the deprecated function __check_region
  2005-08-30 17:08 [PATCH] 2.6.13 - 3/3 - Remove the deprecated function __check_region Stephane Wirtel
@ 2005-08-30 17:15 ` Stephane Wirtel
  0 siblings, 0 replies; 2+ messages in thread
From: Stephane Wirtel @ 2005-08-30 17:15 UTC (permalink / raw)
  To: Stephane Wirtel; +Cc: Linux Kernel Mailing List

Sorry, this patch is canceled. 

I forgot to check with check_region and not with __check_regiond :|

Excuse me again, 


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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-08-30 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-30 17:08 [PATCH] 2.6.13 - 3/3 - Remove the deprecated function __check_region Stephane Wirtel
2005-08-30 17:15 ` Stephane Wirtel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox