patch-2.1.36 linux/drivers/scsi/BusLogic.c

Next file: linux/drivers/scsi/NCR5380.c
Previous file: linux/drivers/scsi/AM53C974.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.35/linux/drivers/scsi/BusLogic.c linux/drivers/scsi/BusLogic.c
@@ -43,6 +43,7 @@
 #include <linux/stat.h>
 #include <linux/pci.h>
 #include <linux/bios32.h>
+#include <linux/init.h>
 #include <asm/dma.h>
 #include <asm/io.h>
 #include <asm/system.h>
@@ -222,7 +223,8 @@
   Host Adapter.
 */
 
-static boolean BusLogic_CreateMailboxes(BusLogic_HostAdapter_T *HostAdapter)
+__initfunc(static boolean
+BusLogic_CreateMailboxes(BusLogic_HostAdapter_T *HostAdapter))
 {
   /*
     FlashPoint Host Adapters do not use Outgoing and Incoming Mailboxes.
@@ -304,7 +306,8 @@
   BusLogic_CreateInitialCCBs allocates the initial CCBs for Host Adapter.
 */
 
-static boolean BusLogic_CreateInitialCCBs(BusLogic_HostAdapter_T *HostAdapter)
+__initfunc(static boolean
+BusLogic_CreateInitialCCBs(BusLogic_HostAdapter_T *HostAdapter))
 {
   int Allocated;
   for (Allocated = 0; Allocated < HostAdapter->InitialCCBs; Allocated++)
@@ -417,8 +420,8 @@
   structure for Host Adapter.
 */
 
-static boolean BusLogic_CreateTargetDeviceStatistics(BusLogic_HostAdapter_T
-						     *HostAdapter)
+__initfunc(static boolean
+BusLogic_CreateTargetDeviceStatistics(BusLogic_HostAdapter_T *HostAdapter))
 {
   HostAdapter->TargetDeviceStatistics =
     (BusLogic_TargetDeviceStatistics_T *)
@@ -708,7 +711,7 @@
   only from the list of standard BusLogic MultiMaster ISA I/O Addresses.
 */
 
-static void BusLogic_InitializeProbeInfoListISA(void)
+static inline void BusLogic_InitializeProbeInfoListISA(void)
 {
   int StandardAddressIndex;
   /*
@@ -746,8 +749,9 @@
   of increasing PCI Bus and Device Number.
 */
 
-static void BusLogic_SortProbeInfo(BusLogic_ProbeInfo_T *ProbeInfoList,
-				   int ProbeInfoCount)
+__initfunc(static void
+BusLogic_SortProbeInfo(BusLogic_ProbeInfo_T *ProbeInfoList,
+		       int ProbeInfoCount))
 {
   int LastInterchange = ProbeInfoCount-1, Bound, j;
   while (LastInterchange > 0)
@@ -781,7 +785,7 @@
   I/O Addresses.  It returns the number of PCI MultiMaster Host Adapters found.
 */
 
-static int BusLogic_InitializeMultiMasterProbeInfo(void)
+__initfunc(static int BusLogic_InitializeMultiMasterProbeInfo(void))
 {
   boolean StandardAddressSeen[BusLogic_ISA_StandardAddressesCount];
   BusLogic_ProbeInfo_T *PrimaryProbeInfo =
@@ -1012,7 +1016,7 @@
   number of FlashPoint Host Adapters found.
 */
 
-static int BusLogic_InitializeFlashPointProbeInfo(void)
+__initfunc(static int BusLogic_InitializeFlashPointProbeInfo(void))
 {
   int FlashPointIndex = BusLogic_ProbeInfoCount, FlashPointCount = 0;
   unsigned char Bus, DeviceFunction, IRQ_Channel;
@@ -1119,7 +1123,7 @@
   particular probe order.
 */
 
-static void BusLogic_InitializeProbeInfoList(void)
+static inline void BusLogic_InitializeProbeInfoList(void)
 {
   /*
     If BusLogic_Setup has provided an I/O Address probe list, do not override
@@ -1228,7 +1232,8 @@
   BusLogic_ProbeHostAdapter probes for a BusLogic Host Adapter.
 */
 
-static boolean BusLogic_ProbeHostAdapter(BusLogic_HostAdapter_T *HostAdapter)
+__initfunc(static boolean
+BusLogic_ProbeHostAdapter(BusLogic_HostAdapter_T *HostAdapter))
 {
   BusLogic_StatusRegister_T StatusRegister;
   BusLogic_InterruptRegister_T InterruptRegister;
@@ -1422,7 +1427,8 @@
   Host Adapter.  It also determines the IRQ Channel for non-PCI Host Adapters.
 */
 
-static boolean BusLogic_CheckHostAdapter(BusLogic_HostAdapter_T *HostAdapter)
+__initfunc(static boolean
+BusLogic_CheckHostAdapter(BusLogic_HostAdapter_T *HostAdapter))
 {
   BusLogic_Configuration_T Configuration;
   BusLogic_ExtendedSetupInformation_T ExtendedSetupInformation;
@@ -1485,8 +1491,8 @@
   from Host Adapter and initializes the Host Adapter structure.
 */
 
-static boolean BusLogic_ReadHostAdapterConfiguration(BusLogic_HostAdapter_T
-						     *HostAdapter)
+__initfunc(static boolean
+BusLogic_ReadHostAdapterConfiguration(BusLogic_HostAdapter_T *HostAdapter))
 {
   BusLogic_BoardID_T BoardID;
   BusLogic_Configuration_T Configuration;
@@ -1999,8 +2005,8 @@
   Host Adapter.
 */
 
-static boolean BusLogic_ReportHostAdapterConfiguration(BusLogic_HostAdapter_T
-						       *HostAdapter)
+__initfunc(static boolean
+BusLogic_ReportHostAdapterConfiguration(BusLogic_HostAdapter_T *HostAdapter))
 {
   unsigned short AllTargetsMask = (1 << HostAdapter->MaxTargetDevices) - 1;
   unsigned short SynchronousPermitted, FastPermitted;
@@ -2225,7 +2231,8 @@
   Host Adapter.
 */
 
-static boolean BusLogic_AcquireResources(BusLogic_HostAdapter_T *HostAdapter)
+__initfunc(static boolean
+BusLogic_AcquireResources(BusLogic_HostAdapter_T *HostAdapter))
 {
   BusLogic_HostAdapter_T *FirstHostAdapter =
     BusLogic_RegisteredHostAdapters[HostAdapter->IRQ_Channel];
@@ -2311,7 +2318,8 @@
   interrupts do not get through as a result.
 */
 
-static boolean BusLogic_TestInterrupts(BusLogic_HostAdapter_T *HostAdapter)
+__initfunc(static boolean
+BusLogic_TestInterrupts(BusLogic_HostAdapter_T *HostAdapter))
 {
   unsigned int InitialInterruptCount, FinalInterruptCount;
   int TestCount = 5, i;
@@ -2600,9 +2608,10 @@
   through explicit acquisition and release of the Host Adapter's Lock.
 */
 
-static void BusLogic_InitializeHostStructure(BusLogic_HostAdapter_T
-					       *HostAdapter,
-					     SCSI_Host_T *Host)
+__initfunc(static void
+BusLogic_InitializeHostStructure(BusLogic_HostAdapter_T
+				 *HostAdapter,
+				 SCSI_Host_T *Host))
 {
   Host->max_id = HostAdapter->MaxTargetDevices;
   Host->max_lun = HostAdapter->MaxLogicalUnits;
@@ -2673,7 +2682,7 @@
   registered.
 */
 
-int BusLogic_DetectHostAdapter(SCSI_Host_Template_T *HostTemplate)
+__initfunc(int BusLogic_DetectHostAdapter(SCSI_Host_Template_T *HostTemplate))
 {
   int BusLogicHostAdapterCount = 0, CommandLineEntryIndex = 0, ProbeIndex;
   char *MessageBuffer = NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov