[POWERPC] Build fix for drivers/macintosh/mediabay.c

This fixes the following build error with CONFIG_BLK_DEV_IDE_PMAC=n:

<-- snip -->

...
CC drivers/macintosh/mediabay.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/macintosh/mediabay.c: In function 'check_media_bay':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/macintosh/mediabay.c:428: error: 'struct media_bay_info' has no member named 'cd_index'
make[3]: *** [drivers/macintosh/mediabay.o] Error 1

<-- snip -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by Adrian Bunk and committed by Paul Mackerras 305c7368 8e01520c

+12 -4
+2 -2
drivers/macintosh/mediabay.c
··· 84 84 int cd_irq; 85 85 int cd_retry; 86 86 #endif 87 - #if defined(CONFIG_BLK_DEV_IDE_PMAC) || defined(CONFIG_MAC_FLOPPY) 87 + #if defined(CONFIG_BLK_DEV_IDE_PMAC) 88 88 int cd_index; 89 89 #endif 90 90 }; ··· 417 417 } 418 418 } 419 419 420 + #ifdef CONFIG_BLK_DEV_IDE_PMAC 420 421 int check_media_bay(struct device_node *which_bay, int what) 421 422 { 422 423 int i; ··· 433 432 } 434 433 EXPORT_SYMBOL(check_media_bay); 435 434 436 - #ifdef CONFIG_BLK_DEV_IDE_PMAC 437 435 int check_media_bay_by_base(unsigned long base, int what) 438 436 { 439 437 int i;
+10 -2
include/asm-powerpc/mediabay.h
··· 17 17 #define MB_POWER 6 /* media bay contains a Power device (???) */ 18 18 #define MB_NO 7 /* media bay contains nothing */ 19 19 20 - int check_media_bay(struct device_node *which_bay, int what); 21 - 22 20 /* Number of bays in the machine or 0 */ 23 21 extern int media_bay_count; 24 22 ··· 27 29 /* called by IDE PMAC host driver to register IDE controller for media bay */ 28 30 int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, 29 31 int irq, ide_hwif_t *hwif); 32 + 33 + int check_media_bay(struct device_node *which_bay, int what); 34 + 35 + #else 36 + 37 + static inline int check_media_bay(struct device_node *which_bay, int what) 38 + { 39 + return -ENODEV; 40 + } 41 + 30 42 #endif 31 43 32 44 #endif /* __KERNEL__ */