#include <linux/blkdev.h>
#include <linux/spinlock.h>
#include <linux/stat.h>
+#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/proc_fs.h>
#include <linux/string.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 {
init_i91uAdapter_table();
- for (i = 0; i < ARRAY_SIZE(i91u_pci_devices); i++)
+ for (i = 0; i < TULSZ(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))
hreg->sg_tablesize = TOTAL_SG_ENTRY; /* Maximun support is 32 */
/* Initial tulip chip */
- ok = request_irq(pHCB->HCS_Intr, i91u_intr, IRQF_DISABLED | IRQF_SHARED, "i91u", hreg);
+ ok = request_irq(pHCB->HCS_Intr, i91u_intr, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg);
if (ok < 0) {
printk(KERN_WARNING "i91u: unable to request IRQ %d\n\n", pHCB->HCS_Intr);
return 0;