aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-06-12 20:07:52 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-27 12:24:00 -0400
commit2427ddd8fae2febe3f5ac1ba76b092541304d9f0 (patch)
tree29d98aa03b1331fb1d1a9aaf3a6dddcc7eb48b11 /drivers
parentb60ba8343b78b182c03cf239d4342785376c1ad1 (diff)
[PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed
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')
-rw-r--r--drivers/ieee1394/ohci1394.c2
-rw-r--r--drivers/isdn/hisax/hfc_pci.c2
-rw-r--r--drivers/net/8139cp.c2
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c14
-rw-r--r--drivers/serial/8250_pci.c4
-rw-r--r--drivers/usb/host/sl811-hcd.c10
6 files changed, 19 insertions, 15 deletions
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index f0d5f2b7de87..800c8d518430 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -3217,7 +3217,7 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
3217{ 3217{
3218 struct hpsb_host *host; 3218 struct hpsb_host *host;
3219 struct ti_ohci *ohci; /* shortcut to currently handled device */ 3219 struct ti_ohci *ohci; /* shortcut to currently handled device */
3220 unsigned long ohci_base; 3220 resource_size_t ohci_base;
3221 3221
3222 if (pci_enable_device(dev)) 3222 if (pci_enable_device(dev))
3223 FAIL(-ENXIO, "Failed to enable OHCI hardware"); 3223 FAIL(-ENXIO, "Failed to enable OHCI hardware");
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index 91d25acb5ede..3622720f0505 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -1688,7 +1688,7 @@ setup_hfcpci(struct IsdnCard *card)
1688 printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n"); 1688 printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n");
1689 return (0); 1689 return (0);
1690 } 1690 }
1691 cs->hw.hfcpci.pci_io = (char *) dev_hfcpci->resource[ 1].start; 1691 cs->hw.hfcpci.pci_io = (char *)(unsigned long)dev_hfcpci->resource[1].start;
1692 printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name); 1692 printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name);
1693 } else { 1693 } else {
1694 printk(KERN_WARNING "HFC-PCI: No PCI card found\n"); 1694 printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index c1e1dc505138..d26dd6a7062d 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1823,7 +1823,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1823 struct cp_private *cp; 1823 struct cp_private *cp;
1824 int rc; 1824 int rc;
1825 void __iomem *regs; 1825 void __iomem *regs;
1826 long pciaddr; 1826 resource_size_t pciaddr;
1827 unsigned int addr_len, i, pci_using_dac; 1827 unsigned int addr_len, i, pci_using_dac;
1828 u8 pci_rev; 1828 u8 pci_rev;
1829 1829
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index cc0313072224..c3176b16b7be 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -72,7 +72,7 @@ static DEFINE_MUTEX(rsrc_mutex);
72======================================================================*/ 72======================================================================*/
73 73
74static struct resource * 74static struct resource *
75make_resource(unsigned long b, unsigned long n, int flags, char *name) 75make_resource(resource_size_t b, resource_size_t n, int flags, char *name)
76{ 76{
77 struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL); 77 struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
78 78
@@ -86,8 +86,8 @@ make_resource(unsigned long b, unsigned long n, int flags, char *name)
86} 86}
87 87
88static struct resource * 88static struct resource *
89claim_region(struct pcmcia_socket *s, unsigned long base, unsigned long size, 89claim_region(struct pcmcia_socket *s, resource_size_t base,
90 int type, char *name) 90 resource_size_t size, int type, char *name)
91{ 91{
92 struct resource *res, *parent; 92 struct resource *res, *parent;
93 93
@@ -519,10 +519,10 @@ struct pcmcia_align_data {
519 519
520static void 520static void
521pcmcia_common_align(void *align_data, struct resource *res, 521pcmcia_common_align(void *align_data, struct resource *res,
522 unsigned long size, unsigned long align) 522 resource_size_t size, resource_size_t align)
523{ 523{
524 struct pcmcia_align_data *data = align_data; 524 struct pcmcia_align_data *data = align_data;
525 unsigned long start; 525 resource_size_t start;
526 /* 526 /*
527 * Ensure that we have the correct start address 527 * Ensure that we have the correct start address
528 */ 528 */
@@ -533,8 +533,8 @@ pcmcia_common_align(void *align_data, struct resource *res,
533} 533}
534 534
535static void 535static void
536pcmcia_align(void *align_data, struct resource *res, 536pcmcia_align(void *align_data, struct resource *res, resource_size_t size,
537 unsigned long size, unsigned long align) 537 resource_size_t align)
538{ 538{
539 struct pcmcia_align_data *data = align_data; 539 struct pcmcia_align_data *data = align_data;
540 struct resource_map *m; 540 struct resource_map *m;
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 94886c000d2a..864ef859be56 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -594,8 +594,8 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board,
594 else 594 else
595 offset += idx * board->uart_offset; 595 offset += idx * board->uart_offset;
596 596
597 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) / 597 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
598 (8 << board->reg_shift); 598 (board->reg_shift + 3);
599 599
600 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr) 600 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
601 return 1; 601 return 1;
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 6b4bc3f2bd86..89bcda5a3298 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -1684,9 +1684,13 @@ sl811h_probe(struct platform_device *dev)
1684 if (!addr || !data) 1684 if (!addr || !data)
1685 return -ENODEV; 1685 return -ENODEV;
1686 ioaddr = 1; 1686 ioaddr = 1;
1687 1687 /*
1688 addr_reg = (void __iomem *) addr->start; 1688 * NOTE: 64-bit resource->start is getting truncated
1689 data_reg = (void __iomem *) data->start; 1689 * to avoid compiler warning, assuming that ->start
1690 * is always 32-bit for this case
1691 */
1692 addr_reg = (void __iomem *) (unsigned long) addr->start;
1693 data_reg = (void __iomem *) (unsigned long) data->start;
1690 } else { 1694 } else {
1691 addr_reg = ioremap(addr->start, 1); 1695 addr_reg = ioremap(addr->start, 1);
1692 if (addr_reg == NULL) { 1696 if (addr_reg == NULL) {