aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-06-12 20:07:07 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-27 12:24:00 -0400
commitb60ba8343b78b182c03cf239d4342785376c1ad1 (patch)
tree4285a89db0427674a51b76107321bfa95a63ddbd /drivers/pnp
parente31dd6e4520439ceae4753f32dd2da2c345e929a (diff)
[PATCH] 64bit resource: change pnp core to use resource_size_t
Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/interface.c8
-rw-r--r--drivers/pnp/manager.c15
-rw-r--r--drivers/pnp/resource.c8
3 files changed, 18 insertions, 13 deletions
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c
index a2d8ce7fef9c..3163e3d73da1 100644
--- a/drivers/pnp/interface.c
+++ b/drivers/pnp/interface.c
@@ -264,7 +264,7 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at
264 if (pnp_port_flags(dev, i) & IORESOURCE_DISABLED) 264 if (pnp_port_flags(dev, i) & IORESOURCE_DISABLED)
265 pnp_printf(buffer," disabled\n"); 265 pnp_printf(buffer," disabled\n");
266 else 266 else
267 pnp_printf(buffer," 0x%lx-0x%lx\n", 267 pnp_printf(buffer," 0x%llx-0x%llx\n",
268 pnp_port_start(dev, i), 268 pnp_port_start(dev, i),
269 pnp_port_end(dev, i)); 269 pnp_port_end(dev, i));
270 } 270 }
@@ -275,7 +275,7 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at
275 if (pnp_mem_flags(dev, i) & IORESOURCE_DISABLED) 275 if (pnp_mem_flags(dev, i) & IORESOURCE_DISABLED)
276 pnp_printf(buffer," disabled\n"); 276 pnp_printf(buffer," disabled\n");
277 else 277 else
278 pnp_printf(buffer," 0x%lx-0x%lx\n", 278 pnp_printf(buffer," 0x%llx-0x%llx\n",
279 pnp_mem_start(dev, i), 279 pnp_mem_start(dev, i),
280 pnp_mem_end(dev, i)); 280 pnp_mem_end(dev, i));
281 } 281 }
@@ -286,7 +286,7 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at
286 if (pnp_irq_flags(dev, i) & IORESOURCE_DISABLED) 286 if (pnp_irq_flags(dev, i) & IORESOURCE_DISABLED)
287 pnp_printf(buffer," disabled\n"); 287 pnp_printf(buffer," disabled\n");
288 else 288 else
289 pnp_printf(buffer," %ld\n", 289 pnp_printf(buffer," %lld\n",
290 pnp_irq(dev, i)); 290 pnp_irq(dev, i));
291 } 291 }
292 } 292 }
@@ -296,7 +296,7 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at
296 if (pnp_dma_flags(dev, i) & IORESOURCE_DISABLED) 296 if (pnp_dma_flags(dev, i) & IORESOURCE_DISABLED)
297 pnp_printf(buffer," disabled\n"); 297 pnp_printf(buffer," disabled\n");
298 else 298 else
299 pnp_printf(buffer," %ld\n", 299 pnp_printf(buffer," %lld\n",
300 pnp_dma(dev, i)); 300 pnp_dma(dev, i));
301 } 301 }
302 } 302 }
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index 6fff109bdab6..1d7a5b87f4cb 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -20,7 +20,8 @@ DECLARE_MUTEX(pnp_res_mutex);
20 20
21static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx) 21static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
22{ 22{
23 unsigned long *start, *end, *flags; 23 resource_size_t *start, *end;
24 unsigned long *flags;
24 25
25 if (!dev || !rule) 26 if (!dev || !rule)
26 return -EINVAL; 27 return -EINVAL;
@@ -63,7 +64,8 @@ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
63 64
64static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx) 65static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
65{ 66{
66 unsigned long *start, *end, *flags; 67 resource_size_t *start, *end;
68 unsigned long *flags;
67 69
68 if (!dev || !rule) 70 if (!dev || !rule)
69 return -EINVAL; 71 return -EINVAL;
@@ -116,7 +118,8 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
116 118
117static int pnp_assign_irq(struct pnp_dev * dev, struct pnp_irq *rule, int idx) 119static int pnp_assign_irq(struct pnp_dev * dev, struct pnp_irq *rule, int idx)
118{ 120{
119 unsigned long *start, *end, *flags; 121 resource_size_t *start, *end;
122 unsigned long *flags;
120 int i; 123 int i;
121 124
122 /* IRQ priority: this table is good for i386 */ 125 /* IRQ priority: this table is good for i386 */
@@ -168,7 +171,8 @@ static int pnp_assign_irq(struct pnp_dev * dev, struct pnp_irq *rule, int idx)
168 171
169static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx) 172static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
170{ 173{
171 unsigned long *start, *end, *flags; 174 resource_size_t *start, *end;
175 unsigned long *flags;
172 int i; 176 int i;
173 177
174 /* DMA priority: this table is good for i386 */ 178 /* DMA priority: this table is good for i386 */
@@ -582,7 +586,8 @@ int pnp_disable_dev(struct pnp_dev *dev)
582 * @size: size of region 586 * @size: size of region
583 * 587 *
584 */ 588 */
585void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) 589void pnp_resource_change(struct resource *resource, resource_size_t start,
590 resource_size_t size)
586{ 591{
587 if (resource == NULL) 592 if (resource == NULL)
588 return; 593 return;
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index 6ded527169f4..7bb892f58cc0 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -241,7 +241,7 @@ int pnp_check_port(struct pnp_dev * dev, int idx)
241{ 241{
242 int tmp; 242 int tmp;
243 struct pnp_dev *tdev; 243 struct pnp_dev *tdev;
244 unsigned long *port, *end, *tport, *tend; 244 resource_size_t *port, *end, *tport, *tend;
245 port = &dev->res.port_resource[idx].start; 245 port = &dev->res.port_resource[idx].start;
246 end = &dev->res.port_resource[idx].end; 246 end = &dev->res.port_resource[idx].end;
247 247
@@ -297,7 +297,7 @@ int pnp_check_mem(struct pnp_dev * dev, int idx)
297{ 297{
298 int tmp; 298 int tmp;
299 struct pnp_dev *tdev; 299 struct pnp_dev *tdev;
300 unsigned long *addr, *end, *taddr, *tend; 300 resource_size_t *addr, *end, *taddr, *tend;
301 addr = &dev->res.mem_resource[idx].start; 301 addr = &dev->res.mem_resource[idx].start;
302 end = &dev->res.mem_resource[idx].end; 302 end = &dev->res.mem_resource[idx].end;
303 303
@@ -358,7 +358,7 @@ int pnp_check_irq(struct pnp_dev * dev, int idx)
358{ 358{
359 int tmp; 359 int tmp;
360 struct pnp_dev *tdev; 360 struct pnp_dev *tdev;
361 unsigned long * irq = &dev->res.irq_resource[idx].start; 361 resource_size_t * irq = &dev->res.irq_resource[idx].start;
362 362
363 /* if the resource doesn't exist, don't complain about it */ 363 /* if the resource doesn't exist, don't complain about it */
364 if (cannot_compare(dev->res.irq_resource[idx].flags)) 364 if (cannot_compare(dev->res.irq_resource[idx].flags))
@@ -423,7 +423,7 @@ int pnp_check_dma(struct pnp_dev * dev, int idx)
423#ifndef CONFIG_IA64 423#ifndef CONFIG_IA64
424 int tmp; 424 int tmp;
425 struct pnp_dev *tdev; 425 struct pnp_dev *tdev;
426 unsigned long * dma = &dev->res.dma_resource[idx].start; 426 resource_size_t * dma = &dev->res.dma_resource[idx].start;
427 427
428 /* if the resource doesn't exist, don't complain about it */ 428 /* if the resource doesn't exist, don't complain about it */
429 if (cannot_compare(dev->res.dma_resource[idx].flags)) 429 if (cannot_compare(dev->res.dma_resource[idx].flags))