[SCSI] drivers/scsi: Use ARRAY_SIZE macro
[safe/jmp/linux-2.6] / drivers / scsi / seagate.c
index a0cace9..7fa4da4 100644 (file)
@@ -312,7 +312,7 @@ static Signature __initdata signatures[] = {
        {"IBM F1 V1.2009/22/93", 5, 25, FD},
 };
 
-#define NUM_SIGNATURES (sizeof(signatures) / sizeof(Signature))
+#define NUM_SIGNATURES ARRAY_SIZE(signatures)
 #endif                         /* n OVERRIDE */
 
 /*
@@ -418,7 +418,7 @@ static inline void borken_wait (void)
 #define ULOOP( i ) for (clock = i*8;;)
 #define TIMEOUT (!(clock--))
 
-int __init seagate_st0x_detect (Scsi_Host_Template * tpnt)
+int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
 {
        struct Scsi_Host *instance;
        int i, j;
@@ -457,7 +457,7 @@ int __init seagate_st0x_detect (Scsi_Host_Template * tpnt)
  * space for the on-board RAM instead.
  */
 
-               for (i = 0; i < (sizeof (seagate_bases) / sizeof (unsigned int)); ++i) {
+               for (i = 0; i < ARRAY_SIZE(seagate_bases); ++i) {
                        void __iomem *p = ioremap(seagate_bases[i], 0x2000);
                        if (!p)
                                continue;
@@ -1649,7 +1649,7 @@ static int seagate_st0x_release(struct Scsi_Host *shost)
        return 0;
 }
 
-static Scsi_Host_Template driver_template = {
+static struct scsi_host_template driver_template = {
        .detect                 = seagate_st0x_detect,
        .release                = seagate_st0x_release,
        .info                   = seagate_st0x_info,