From: Stephane Wirtel <stephane.wirtel@belgacom.net>
To: Stephane Wirtel <stephane.wirtel@belgacom.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2.6.13 - 3/3 - Remove the deprecated function __check_region
Date: Tue, 30 Aug 2005 19:08:20 +0200 [thread overview]
Message-ID: <20050830170820.GB11011@localhost.localdomain> (raw)
[-- 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 */
next reply other threads:[~2005-08-30 17:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-30 17:08 Stephane Wirtel [this message]
2005-08-30 17:15 ` Stephane Wirtel
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=20050830170820.GB11011@localhost.localdomain \
--to=stephane.wirtel@belgacom.net \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®