]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/message/fusion/mptlan.c
[SCSI] mpt fusion: Change call back indices to u8 from int
[linux-2.6-omap-h63xx.git] / drivers / message / fusion / mptlan.c
index 01fc397fdd979f7783bcd90d6c8b5069d1bd0c9e..9d9eb761934b218c63b11daedf6df625d057e163 100644 (file)
@@ -154,7 +154,7 @@ static unsigned short mpt_lan_type_trans(struct sk_buff *skb,
 /*
  *  Fusion MPT LAN private data
  */
-static int LanCtx = -1;
+static u8 LanCtx = MPT_MAX_PROTOCOL_DRIVERS;
 
 static u32 max_buckets_out = 127;
 static u32 tx_max_out_p = 127 - 16;
@@ -164,12 +164,6 @@ static struct NAA_Hosed *mpt_bad_naa = NULL;
 DEFINE_RWLOCK(bad_naa_lock);
 #endif
 
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
- * Fusion MPT LAN external data
- */
-extern int mpt_lan_index;
-
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /**
  *     lan_reply - Handle all data sent from the hardware.
@@ -1510,9 +1504,6 @@ static int __init mpt_lan_init (void)
                return -EBUSY;
        }
 
-       /* Set the callback index to be used by driver core for turbo replies */
-       mpt_lan_index = LanCtx;
-
        dlprintk((KERN_INFO MYNAM ": assigned context of %d\n", LanCtx));
 
        if (mpt_reset_register(LanCtx, mpt_lan_ioc_reset)) {
@@ -1533,10 +1524,9 @@ static void __exit mpt_lan_exit(void)
        mpt_device_driver_deregister(MPTLAN_DRIVER);
        mpt_reset_deregister(LanCtx);
 
-       if (LanCtx >= 0) {
+       if (LanCtx) {
                mpt_deregister(LanCtx);
-               LanCtx = -1;
-               mpt_lan_index = 0;
+               LanCtx = MPT_MAX_PROTOCOL_DRIVERS;
        }
 }