Commit 99c54090 authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] fix drivers/scsi/sd.c for ppc32

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.
parent db96eb55
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment