aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/system.c
diff options
context:
space:
mode:
authorPetr Vandrovec <petr@vandrovec.name>2007-04-02 02:49:46 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-02 13:06:08 -0400
commita2b091dbfb355d0cd35756c6ace0988c9855f3f7 (patch)
tree32ed4c7c7fb286a67c1842410c5c016611ba8d0e /drivers/pnp/system.c
parent7479d2b90b103f84d956a7177b3f99cbd472b345 (diff)
[PATCH] Correctly report PnP 64bit resources
Change PnP resource handling code to use proper type for resource start and length. Fixes bogus regions reported in /proc/iomem. I've also made some pointer constant, as they are constant... Signed-off-by: Petr Vandrovec <petr@vandrovec.name> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pnp/system.c')
-rw-r--r--drivers/pnp/system.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/pnp/system.c b/drivers/pnp/system.c
index 2065e74bb63f..a8a95540b1ef 100644
--- a/drivers/pnp/system.c
+++ b/drivers/pnp/system.c
@@ -22,7 +22,7 @@ static const struct pnp_device_id pnp_dev_table[] = {
22 { "", 0 } 22 { "", 0 }
23}; 23};
24 24
25static void reserve_range(char *pnpid, int start, int end, int port) 25static void reserve_range(const char *pnpid, resource_size_t start, resource_size_t end, int port)
26{ 26{
27 struct resource *res; 27 struct resource *res;
28 char *regionid; 28 char *regionid;
@@ -32,9 +32,9 @@ static void reserve_range(char *pnpid, int start, int end, int port)
32 return; 32 return;
33 snprintf(regionid, 16, "pnp %s", pnpid); 33 snprintf(regionid, 16, "pnp %s", pnpid);
34 if (port) 34 if (port)
35 res = request_region(start,end-start+1,regionid); 35 res = request_region(start, end-start+1, regionid);
36 else 36 else
37 res = request_mem_region(start,end-start+1,regionid); 37 res = request_mem_region(start, end-start+1, regionid);
38 if (res == NULL) 38 if (res == NULL)
39 kfree(regionid); 39 kfree(regionid);
40 else 40 else
@@ -45,12 +45,13 @@ static void reserve_range(char *pnpid, int start, int end, int port)
45 * have double reservations. 45 * have double reservations.
46 */ 46 */
47 printk(KERN_INFO 47 printk(KERN_INFO
48 "pnp: %s: %s range 0x%x-0x%x %s reserved\n", 48 "pnp: %s: %s range 0x%llx-0x%llx %s reserved\n",
49 pnpid, port ? "ioport" : "iomem", start, end, 49 pnpid, port ? "ioport" : "iomem",
50 (unsigned long long)start, (unsigned long long)end,
50 NULL != res ? "has been" : "could not be"); 51 NULL != res ? "has been" : "could not be");
51} 52}
52 53
53static void reserve_resources_of_dev(struct pnp_dev *dev) 54static void reserve_resources_of_dev(const struct pnp_dev *dev)
54{ 55{
55 int i; 56 int i;
56 57