ide: rework PowerMac media-bay support (take 2)
Rework PowerMac media-bay support in such way that instead of un/registering the IDE interface we un/register IDE devices: * Add ide_port_scan() helper for probing+registerering devices on a port. * Rename ide_port_unregister_devices() to __ide_port_unregister_devices(). * Add ide_port_unregister_devices() helper for unregistering devices on a port. * Add 'ide_hwif_t *cd_port' to 'struct media_bay_info', pass 'hwif' instead of hwif->index to media_bay_set_ide_infos() and use it to setup 'cd_port'. * Use ide_port_unregister_devices() instead of ide_unregister() and ide_port_scan() instead of ide_register_hw() in media_bay_step(). * Unexport ide_register_hw() and make it static. v2: * Fix build by adding <linux/ide.h> include to <asm-powerpc/mediabay.h>. (Reported by Michael/Kamalesh/Andrew). Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
@@ -189,10 +189,6 @@ struct hwif_s * ide_find_port(unsigned long);
|
||||
void ide_init_port_data(struct hwif_s *, unsigned int);
|
||||
void ide_init_port_hw(struct hwif_s *, hw_regs_t *);
|
||||
|
||||
struct ide_drive_s;
|
||||
int ide_register_hw(hw_regs_t *, void (*)(struct ide_drive_s *),
|
||||
struct hwif_s **);
|
||||
|
||||
static inline void ide_std_init_ports(hw_regs_t *hw,
|
||||
unsigned long io_addr,
|
||||
unsigned long ctl_addr)
|
||||
@@ -1204,6 +1200,8 @@ void ide_undecoded_slave(ide_drive_t *);
|
||||
|
||||
int ide_device_add_all(u8 *idx, const struct ide_port_info *);
|
||||
int ide_device_add(u8 idx[4], const struct ide_port_info *);
|
||||
void ide_port_unregister_devices(ide_hwif_t *);
|
||||
void ide_port_scan(ide_hwif_t *);
|
||||
|
||||
static inline void *ide_get_hwifdata (ide_hwif_t * hwif)
|
||||
{
|
||||
|
Reference in New Issue
Block a user