vserver 1.9.3
[linux-2.6.git] / drivers / scsi / nsp32.c
index 13d5875..9735d05 100644 (file)
@@ -44,7 +44,7 @@
 #include <asm/io.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>
 #include <scsi/scsi.h>
 
@@ -267,8 +267,8 @@ static        void nsp32_prom_stop     (nsp32_hw_data *);
 static        int  nsp32_prom_read     (nsp32_hw_data *, int);
 static        int  nsp32_prom_read_bit (nsp32_hw_data *);
 static        void nsp32_prom_write_bit(nsp32_hw_data *, int);
-static inline void nsp32_prom_set      (nsp32_hw_data *, int, int);
-static inline int  nsp32_prom_get      (nsp32_hw_data *, int);
+static        void nsp32_prom_set      (nsp32_hw_data *, int, int);
+static        int  nsp32_prom_get      (nsp32_hw_data *, int);
 
 /* debug/warning/info message */
 static void nsp32_message (const char *, int, char *, char *, ...);
@@ -1604,7 +1604,7 @@ static int nsp32_proc_info(
        thislength = pos - (buffer + offset);
 
        if(thislength < 0) {
-               *start = 0;
+               *start = NULL;
                 return 0;
         }
 
@@ -3342,6 +3342,48 @@ static int nsp32_prom_read(nsp32_hw_data *data, int romaddr)
        return val;
 }
 
+static void nsp32_prom_set(nsp32_hw_data *data, int bit, int val)
+{
+       int base = data->BaseAddress;
+       int tmp;
+
+       tmp = nsp32_index_read1(base, SERIAL_ROM_CTL);
+
+       if (val == 0) {
+               tmp &= ~bit;
+       } else {
+               tmp |=  bit;
+       }
+
+       nsp32_index_write1(base, SERIAL_ROM_CTL, tmp);
+
+       udelay(10);
+}
+
+static int nsp32_prom_get(nsp32_hw_data *data, int bit)
+{
+       int base = data->BaseAddress;
+       int tmp, ret;
+
+       if (bit != SDA) {
+               nsp32_msg(KERN_ERR, "return value is not appropriate");
+               return 0;
+       }
+
+
+       tmp = nsp32_index_read1(base, SERIAL_ROM_CTL) & bit;
+
+       if (tmp == 0) {
+               ret = 0;
+       } else {
+               ret = 1;
+       }
+
+       udelay(10);
+
+       return ret;
+}
+
 static void nsp32_prom_start (nsp32_hw_data *data)
 {
        /* start condition */
@@ -3387,48 +3429,6 @@ static int nsp32_prom_read_bit(nsp32_hw_data *data)
        return val;
 }
 
-static inline void nsp32_prom_set(nsp32_hw_data *data, int bit, int val)
-{
-       int base = data->BaseAddress;
-       int tmp;
-
-       tmp = nsp32_index_read1(base, SERIAL_ROM_CTL);
-
-       if (val == 0) {
-               tmp &= ~bit;
-       } else {
-               tmp |=  bit;
-       }
-
-       nsp32_index_write1(base, SERIAL_ROM_CTL, tmp);
-
-       udelay(10);
-}
-
-static inline int nsp32_prom_get(nsp32_hw_data *data, int bit)
-{
-       int base = data->BaseAddress;
-       int tmp, ret;
-
-       if (bit != SDA) {
-               nsp32_msg(KERN_ERR, "return value is not appropriate");
-               return 0;
-       }
-
-
-       tmp = nsp32_index_read1(base, SERIAL_ROM_CTL) & bit;
-
-       if (tmp == 0) {
-               ret = 0;
-       } else {
-               ret = 1;
-       }
-
-       udelay(10);
-
-       return ret;
-}
-
 
 /**************************************************************************
  * Power Management