Merge branch 'master' of /home/sam/kernel/linux-2.6/
[linux-block.git] / drivers / parisc / lba_pci.c
index cbae8c8963fa3bdd163e729198b3764baafe7e28..3fe4a77fa16a2301f0cb5a3ff96a51bb0c27ca18 100644 (file)
@@ -1213,7 +1213,7 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
                        ** Postable I/O port space is per PCI host adapter.
                        ** base of 64MB PIOP region
                        */
-                       lba_dev->iop_base = ioremap(p->start, 64 * 1024 * 1024);
+                       lba_dev->iop_base = ioremap_nocache(p->start, 64 * 1024 * 1024);
 
                        sprintf(lba_dev->hba.io_name, "PCI%02lx Ports",
                                        lba_dev->hba.bus_num.start);
@@ -1525,7 +1525,7 @@ lba_driver_probe(struct parisc_device *dev)
        u32 func_class;
        void *tmp_obj;
        char *version;
-       void __iomem *addr = ioremap(dev->hpa.start, 4096);
+       void __iomem *addr = ioremap_nocache(dev->hpa.start, 4096);
 
        /* Read HW Rev First */
        func_class = READ_REG32(addr + LBA_FCLASS);
@@ -1565,7 +1565,7 @@ lba_driver_probe(struct parisc_device *dev)
        } else if (IS_MERCURY(dev) || IS_QUICKSILVER(dev)) {
                func_class &= 0xff;
                version = kmalloc(6, GFP_KERNEL);
-               sprintf(version,"TR%d.%d",(func_class >> 4),(func_class & 0xf));
+               snprintf(version, 6, "TR%d.%d",(func_class >> 4),(func_class & 0xf));
                /* We could use one printk for both Elroy and Mercury,
                  * but for the mask for func_class.
                  */ 
@@ -1586,14 +1586,12 @@ lba_driver_probe(struct parisc_device *dev)
        **      have an IRT entry will get NULL back from iosapic code.
        */
        
-       lba_dev = kmalloc(sizeof(struct lba_device), GFP_KERNEL);
+       lba_dev = kzalloc(sizeof(struct lba_device), GFP_KERNEL);
        if (!lba_dev) {
                printk(KERN_ERR "lba_init_chip - couldn't alloc lba_device\n");
                return(1);
        }
 
-       memset(lba_dev, 0, sizeof(struct lba_device));
-
 
        /* ---------- First : initialize data we already have --------- */
 
@@ -1621,7 +1619,7 @@ lba_driver_probe(struct parisc_device *dev)
        } else {
                if (!astro_iop_base) {
                        /* Sprockets PDC uses NPIOP region */
-                       astro_iop_base = ioremap(LBA_PORT_BASE, 64 * 1024);
+                       astro_iop_base = ioremap_nocache(LBA_PORT_BASE, 64 * 1024);
                        pci_port = &lba_astro_port_ops;
                }
 
@@ -1702,7 +1700,7 @@ void __init lba_init(void)
 */
 void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask)
 {
-       void __iomem * base_addr = ioremap(lba->hpa.start, 4096);
+       void __iomem * base_addr = ioremap_nocache(lba->hpa.start, 4096);
 
        imask <<= 2;    /* adjust for hints - 2 more bits */