]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix drivers/scsi/sd.c for ppc32
authorPaul Mackerras <paulus@samba.org>
Thu, 9 May 2002 05:03:06 +0000 (22:03 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Thu, 9 May 2002 05:03:06 +0000 (22:03 -0700)
This patch fixes the compile errors in sd_find_target, which is only
used on 32-bit PPC systems, and changes the ifdef around from
CONFIG_PPC to CONFIG_PPC32 since ppc64 doesn't need this routine.

drivers/scsi/sd.c

index 043ef3799ed15f2892db959d20e8e7f9a5919a04..0b243af1435b4894a058db357ca268aa70c4c999 100644 (file)
@@ -129,7 +129,7 @@ static void sd_rw_intr(Scsi_Cmnd * SCpnt);
 static Scsi_Disk * sd_get_sdisk(int index);
 
 
-#if defined(CONFIG_PPC)
+#if defined(CONFIG_PPC32)
 /**
  *     sd_find_target - find kdev_t of first scsi disk that matches
  *     given host and scsi_id. 
@@ -149,7 +149,7 @@ sd_find_target(void *hp, int scsi_id)
 {
        Scsi_Disk *sdkp;
        Scsi_Device *sdp;
-       Scsi_Host *shp = hp;
+       struct Scsi_Host *shp = hp;
        int dsk_nr;
        unsigned long iflags;
 
@@ -162,7 +162,7 @@ sd_find_target(void *hp, int scsi_id)
                sdp = sdkp->device;
                if (sdp && (sdp->host == shp) && (sdp->id == scsi_id)) {
                        read_unlock_irqrestore(&sd_dsk_arr_lock, iflags);
-                       return MKDEV_SD(k);
+                       return MKDEV_SD(dsk_nr);
                }
        }
        read_unlock_irqrestore(&sd_dsk_arr_lock, iflags);