aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/mediabay.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh/mediabay.c')
-rw-r--r--drivers/macintosh/mediabay.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 82add26cc665..818aba368541 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -84,7 +84,7 @@ struct media_bay_info {
84 int cd_irq; 84 int cd_irq;
85 int cd_retry; 85 int cd_retry;
86#endif 86#endif
87#if defined(CONFIG_BLK_DEV_IDE_PMAC) || defined(CONFIG_MAC_FLOPPY) 87#if defined(CONFIG_BLK_DEV_IDE_PMAC)
88 int cd_index; 88 int cd_index;
89#endif 89#endif
90}; 90};
@@ -417,6 +417,7 @@ static void poll_media_bay(struct media_bay_info* bay)
417 } 417 }
418} 418}
419 419
420#ifdef CONFIG_BLK_DEV_IDE_PMAC
420int check_media_bay(struct device_node *which_bay, int what) 421int check_media_bay(struct device_node *which_bay, int what)
421{ 422{
422 int i; 423 int i;
@@ -432,7 +433,6 @@ int check_media_bay(struct device_node *which_bay, int what)
432} 433}
433EXPORT_SYMBOL(check_media_bay); 434EXPORT_SYMBOL(check_media_bay);
434 435
435#ifdef CONFIG_BLK_DEV_IDE_PMAC
436int check_media_bay_by_base(unsigned long base, int what) 436int check_media_bay_by_base(unsigned long base, int what)
437{ 437{
438 int i; 438 int i;
@@ -556,7 +556,8 @@ static void media_bay_step(int i)
556 printk("mediabay %d, registering IDE...\n", i); 556 printk("mediabay %d, registering IDE...\n", i);
557 pmu_suspend(); 557 pmu_suspend();
558 ide_port_scan(bay->cd_port); 558 ide_port_scan(bay->cd_port);
559 bay->cd_index = bay->cd_port->index; 559 if (bay->cd_port->present)
560 bay->cd_index = bay->cd_port->index;
560 pmu_resume(); 561 pmu_resume();
561 } 562 }
562 if (bay->cd_index == -1) { 563 if (bay->cd_index == -1) {