aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/arm/palm_bk3710.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:26 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:26 -0400
commit7e59ea21aab1a91ca31bc64c7d3035ebdbd336d1 (patch)
tree6cdbc937687dbba316f22e2b68cb036511fce951 /drivers/ide/arm/palm_bk3710.c
parent2a924662b646fa25cb491d50aa1202a94aa4ac55 (diff)
ide: check drive->present in ide_get_paired_drive()
* Change ide_get_paired_drive() to return NULL if peer device is not present and update all users accordingly. While at it: * ide_get_paired_drive() -> ide_get_pair_dev() * Use ide_get_pair_dev() in cs5530.c, sc1200.c and via82cxxx.c. There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/arm/palm_bk3710.c')
-rw-r--r--drivers/ide/arm/palm_bk3710.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c
index 6cea984776fd..320971c78cb7 100644
--- a/drivers/ide/arm/palm_bk3710.c
+++ b/drivers/ide/arm/palm_bk3710.c
@@ -180,7 +180,7 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate,
180 val32 |= (t2i << (dev ? 8 : 0)); 180 val32 |= (t2i << (dev ? 8 : 0));
181 writel(val32, base + BK3710_DATRCVR); 181 writel(val32, base + BK3710_DATRCVR);
182 182
183 if (mate && mate->present) { 183 if (mate) {
184 u8 mode2 = ide_get_best_pio_mode(mate, 255, 4); 184 u8 mode2 = ide_get_best_pio_mode(mate, 255, 4);
185 185
186 if (mode2 < mode) 186 if (mode2 < mode)
@@ -230,7 +230,7 @@ static void palm_bk3710_set_pio_mode(ide_drive_t *drive, u8 pio)
230 * Obtain the drive PIO data for tuning the Palm Chip registers 230 * Obtain the drive PIO data for tuning the Palm Chip registers
231 */ 231 */
232 cycle_time = ide_pio_cycle_time(drive, pio); 232 cycle_time = ide_pio_cycle_time(drive, pio);
233 mate = ide_get_paired_drive(drive); 233 mate = ide_get_pair_dev(drive);
234 palm_bk3710_setpiomode(base, mate, is_slave, cycle_time, pio); 234 palm_bk3710_setpiomode(base, mate, is_slave, cycle_time, pio);
235} 235}
236 236