diff options
Diffstat (limited to 'drivers/pnp/system.c')
-rw-r--r-- | drivers/pnp/system.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/pnp/system.c b/drivers/pnp/system.c index 59b90922da8c..242d3a872011 100644 --- a/drivers/pnp/system.c +++ b/drivers/pnp/system.c | |||
@@ -22,11 +22,11 @@ static const struct pnp_device_id pnp_dev_table[] = { | |||
22 | {"", 0} | 22 | {"", 0} |
23 | }; | 23 | }; |
24 | 24 | ||
25 | static void reserve_range(struct pnp_dev *dev, resource_size_t start, | 25 | static void reserve_range(struct pnp_dev *dev, struct resource *r, int port) |
26 | resource_size_t end, int port) | ||
27 | { | 26 | { |
28 | char *regionid; | 27 | char *regionid; |
29 | const char *pnpid = dev_name(&dev->dev); | 28 | const char *pnpid = dev_name(&dev->dev); |
29 | resource_size_t start = r->start, end = r->end; | ||
30 | struct resource *res; | 30 | struct resource *res; |
31 | 31 | ||
32 | regionid = kmalloc(16, GFP_KERNEL); | 32 | regionid = kmalloc(16, GFP_KERNEL); |
@@ -48,10 +48,8 @@ static void reserve_range(struct pnp_dev *dev, resource_size_t start, | |||
48 | * example do reserve stuff they know about too, so we may well | 48 | * example do reserve stuff they know about too, so we may well |
49 | * have double reservations. | 49 | * have double reservations. |
50 | */ | 50 | */ |
51 | dev_info(&dev->dev, "%s range 0x%llx-0x%llx %s reserved\n", | 51 | dev_info(&dev->dev, "%pRt %s reserved\n", r, |
52 | port ? "ioport" : "iomem", | 52 | res ? "has been" : "could not be"); |
53 | (unsigned long long) start, (unsigned long long) end, | ||
54 | res ? "has been" : "could not be"); | ||
55 | } | 53 | } |
56 | 54 | ||
57 | static void reserve_resources_of_dev(struct pnp_dev *dev) | 55 | static void reserve_resources_of_dev(struct pnp_dev *dev) |
@@ -77,14 +75,14 @@ static void reserve_resources_of_dev(struct pnp_dev *dev) | |||
77 | if (res->end < res->start) | 75 | if (res->end < res->start) |
78 | continue; /* invalid */ | 76 | continue; /* invalid */ |
79 | 77 | ||
80 | reserve_range(dev, res->start, res->end, 1); | 78 | reserve_range(dev, res, 1); |
81 | } | 79 | } |
82 | 80 | ||
83 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) { | 81 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) { |
84 | if (res->flags & IORESOURCE_DISABLED) | 82 | if (res->flags & IORESOURCE_DISABLED) |
85 | continue; | 83 | continue; |
86 | 84 | ||
87 | reserve_range(dev, res->start, res->end, 0); | 85 | reserve_range(dev, res, 0); |
88 | } | 86 | } |
89 | } | 87 | } |
90 | 88 | ||