]> err.no Git - linux-2.6/commitdiff
[PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where...
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 13 Jun 2006 00:07:52 +0000 (17:07 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 27 Jun 2006 16:24:00 +0000 (09:24 -0700)
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>
drivers/ieee1394/ohci1394.c
drivers/isdn/hisax/hfc_pci.c
drivers/net/8139cp.c
drivers/pcmcia/rsrc_nonstatic.c
drivers/serial/8250_pci.c
drivers/usb/host/sl811-hcd.c

index f0d5f2b7de8728748e276bda385800aff9b5e7eb..800c8d5184302b0195f5ab1f34783d718523e192 100644 (file)
@@ -3217,7 +3217,7 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
 {
        struct hpsb_host *host;
        struct ti_ohci *ohci;   /* shortcut to currently handled device */
-       unsigned long ohci_base;
+       resource_size_t ohci_base;
 
         if (pci_enable_device(dev))
                FAIL(-ENXIO, "Failed to enable OHCI hardware");
index 91d25acb5ede07f39d8859204e5b6daa9f150315..3622720f05053a01cb37161ab27b2ce9a2fb6f0c 100644 (file)
@@ -1688,7 +1688,7 @@ setup_hfcpci(struct IsdnCard *card)
                                printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n");
                                return (0);
                        }
-                       cs->hw.hfcpci.pci_io = (char *) dev_hfcpci->resource[ 1].start;
+                       cs->hw.hfcpci.pci_io = (char *)(unsigned long)dev_hfcpci->resource[1].start;
                        printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name);
                } else {
                        printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
index c1e1dc505138461da50c087d3497ae4db76d4fcc..d26dd6a7062dcd2e72cb05a973fe1e78962fb7b4 100644 (file)
@@ -1823,7 +1823,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        struct cp_private *cp;
        int rc;
        void __iomem *regs;
-       long pciaddr;
+       resource_size_t pciaddr;
        unsigned int addr_len, i, pci_using_dac;
        u8 pci_rev;
 
index cc0313072224daea334b1ccf75af38b3847b5be7..c3176b16b7bea5223aba2031251196cd88440533 100644 (file)
@@ -72,7 +72,7 @@ static DEFINE_MUTEX(rsrc_mutex);
 ======================================================================*/
 
 static struct resource *
-make_resource(unsigned long b, unsigned long n, int flags, char *name)
+make_resource(resource_size_t b, resource_size_t n, int flags, char *name)
 {
        struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
 
@@ -86,8 +86,8 @@ make_resource(unsigned long b, unsigned long n, int flags, char *name)
 }
 
 static struct resource *
-claim_region(struct pcmcia_socket *s, unsigned long base, unsigned long size,
-            int type, char *name)
+claim_region(struct pcmcia_socket *s, resource_size_t base,
+               resource_size_t size, int type, char *name)
 {
        struct resource *res, *parent;
 
@@ -519,10 +519,10 @@ struct pcmcia_align_data {
 
 static void
 pcmcia_common_align(void *align_data, struct resource *res,
-                   unsigned long size, unsigned long align)
+                       resource_size_t size, resource_size_t align)
 {
        struct pcmcia_align_data *data = align_data;
-       unsigned long start;
+       resource_size_t start;
        /*
         * Ensure that we have the correct start address
         */
@@ -533,8 +533,8 @@ pcmcia_common_align(void *align_data, struct resource *res,
 }
 
 static void
-pcmcia_align(void *align_data, struct resource *res,
-            unsigned long size, unsigned long align)
+pcmcia_align(void *align_data, struct resource *res, resource_size_t size,
+               resource_size_t align)
 {
        struct pcmcia_align_data *data = align_data;
        struct resource_map *m;
index 94886c000d2a2e8ff9581d83423bee68cfeaa409..864ef859be5676e3c6638517e31d87d1a4045229 100644 (file)
@@ -594,8 +594,8 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board,
        else
                offset += idx * board->uart_offset;
 
-       maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) /
-               (8 << board->reg_shift);
+       maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
+               (board->reg_shift + 3);
 
        if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
                return 1;
index 6b4bc3f2bd864fd28b3b135118db929735ecf016..89bcda5a329897aee7d5694b879595355190d84e 100644 (file)
@@ -1684,9 +1684,13 @@ sl811h_probe(struct platform_device *dev)
                if (!addr || !data)
                        return -ENODEV;
                ioaddr = 1;
-
-               addr_reg = (void __iomem *) addr->start;
-               data_reg = (void __iomem *) data->start;
+               /*
+                * NOTE: 64-bit resource->start is getting truncated
+                * to avoid compiler warning, assuming that ->start
+                * is always 32-bit for this case
+                */
+               addr_reg = (void __iomem *) (unsigned long) addr->start;
+               data_reg = (void __iomem *) (unsigned long) data->start;
        } else {
                addr_reg = ioremap(addr->start, 1);
                if (addr_reg == NULL) {