]> err.no Git - linux-2.6/blobdiff - drivers/scsi/initio.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / drivers / scsi / initio.c
index ea6f3c0e05d9632a148e2b6a03c14bbc66a20722..913ba95f85bdf297551dd8985a8480e5732ac1de 100644 (file)
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/jiffies.h>
+#include <linux/dma-mapping.h>
 #include <asm/io.h>
 
 #include <scsi/scsi.h>
 static unsigned int i91u_debug = DEBUG_DEFAULT;
 #endif
 
-#define TULSZ(sz)     (sizeof(sz) / sizeof(sz[0]))
 #define TUL_RDWORD(x,y)         (short)(inl((int)((ULONG)((ULONG)x+(UCHAR)y)) ))
 
 typedef struct PCI_ID_Struc {
@@ -2770,7 +2770,7 @@ static int tul_NewReturnNumberOfAdapters(void)
 
        init_i91uAdapter_table();
 
-       for (i = 0; i < TULSZ(i91u_pci_devices); i++)
+       for (i = 0; i < ARRAY_SIZE(i91u_pci_devices); i++)
        {
                while ((pDev = pci_find_device(i91u_pci_devices[i].vendor_id, i91u_pci_devices[i].device_id, pDev)) != NULL) {
                        if (pci_enable_device(pDev))
@@ -2780,7 +2780,7 @@ static int tul_NewReturnNumberOfAdapters(void)
                        if (((dRegValue & 0xFF00) >> 8) == 0xFF)
                                dRegValue = 0;
                        wBIOS = (wBIOS << 8) + ((UWORD) ((dRegValue & 0xFF00) >> 8));
-                       if (pci_set_dma_mask(pDev, 0xffffffff)) {
+                       if (pci_set_dma_mask(pDev, DMA_32BIT_MASK)) {
                                printk(KERN_WARNING 
                                       "i91u: Could not set 32 bit DMA mask\n");
                                continue;