X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fide%2Flegacy%2Fdtc2278.c;h=689b2e493413412a235202ee5eb742a78440a082;hb=a45fbc33137b11e479ea8b7d478a1d7e6488971b;hp=73396f70f2b74c6aed1b5a7c41da3dde495d4fe2;hpb=70ec75c5b8e0bda7a16fb387f91e08545f379a0e;p=linux-2.6-omap-h63xx.git diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c index 73396f70f2b..689b2e49341 100644 --- a/drivers/ide/legacy/dtc2278.c +++ b/drivers/ide/legacy/dtc2278.c @@ -10,12 +10,13 @@ #include #include #include -#include #include #include #include +#define DRV_NAME "dtc2278" + /* * Changing this #undef to #define may solve start up problems in some systems. */ @@ -86,29 +87,26 @@ static void dtc2278_set_pio_mode(ide_drive_t *drive, const u8 pio) } } +static const struct ide_port_ops dtc2278_port_ops = { + .set_pio_mode = dtc2278_set_pio_mode, +}; + static const struct ide_port_info dtc2278_port_info __initdata = { + .name = DRV_NAME, .chipset = ide_dtc2278, + .port_ops = &dtc2278_port_ops, .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_NO_UNMASK_IRQS | IDE_HFLAG_IO_32BIT | /* disallow ->io_32bit changes */ IDE_HFLAG_NO_IO_32BIT | - IDE_HFLAG_NO_DMA | - IDE_HFLAG_NO_AUTOTUNE, + IDE_HFLAG_NO_DMA, .pio_mask = ATA_PIO4, }; static int __init dtc2278_probe(void) { unsigned long flags; - ide_hwif_t *hwif, *mate; - static u8 idx[4] = { 0, 1, 0xff, 0xff }; - - hwif = &ide_hwifs[0]; - mate = &ide_hwifs[1]; - - if (hwif->chipset != ide_unknown || mate->chipset != ide_unknown) - return 1; local_irq_save(flags); /* @@ -128,14 +126,10 @@ static int __init dtc2278_probe(void) #endif local_irq_restore(flags); - hwif->set_pio_mode = &dtc2278_set_pio_mode; - - ide_device_add(idx, &dtc2278_port_info); - - return 0; + return ide_legacy_device_add(&dtc2278_port_info, 0); } -int probe_dtc2278 = 0; +static int probe_dtc2278; module_param_named(probe, probe_dtc2278, bool, 0); MODULE_PARM_DESC(probe, "probe for DTC2278xx chipsets");