aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/mips/au1xxx-ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/mips/au1xxx-ide.c')
-rw-r--r--drivers/ide/mips/au1xxx-ide.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 1a6c27b32498..48d57cae63c6 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -213,10 +213,8 @@ static int auide_build_dmatable(ide_drive_t *drive)
213{ 213{
214 int i, iswrite, count = 0; 214 int i, iswrite, count = 0;
215 ide_hwif_t *hwif = HWIF(drive); 215 ide_hwif_t *hwif = HWIF(drive);
216
217 struct request *rq = HWGROUP(drive)->rq; 216 struct request *rq = HWGROUP(drive)->rq;
218 217 _auide_hwif *ahwif = &auide_hwif;
219 _auide_hwif *ahwif = (_auide_hwif*)hwif->hwif_data;
220 struct scatterlist *sg; 218 struct scatterlist *sg;
221 219
222 iswrite = (rq_data_dir(rq) == WRITE); 220 iswrite = (rq_data_dir(rq) == WRITE);
@@ -402,7 +400,7 @@ static const struct ide_dma_ops au1xxx_dma_ops = {
402 400
403static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) 401static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
404{ 402{
405 _auide_hwif *auide = (_auide_hwif *)hwif->hwif_data; 403 _auide_hwif *auide = &auide_hwif;
406 dbdev_tab_t source_dev_tab, target_dev_tab; 404 dbdev_tab_t source_dev_tab, target_dev_tab;
407 u32 dev_id, tsize, devwidth, flags; 405 u32 dev_id, tsize, devwidth, flags;
408 406
@@ -463,7 +461,7 @@ static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
463#else 461#else
464static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) 462static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
465{ 463{
466 _auide_hwif *auide = (_auide_hwif *)hwif->hwif_data; 464 _auide_hwif *auide = &auide_hwif;
467 dbdev_tab_t source_dev_tab; 465 dbdev_tab_t source_dev_tab;
468 int flags; 466 int flags;
469 467
@@ -600,8 +598,6 @@ static int au_ide_probe(struct device *dev)
600 598
601 ide_init_port_hw(hwif, &hw); 599 ide_init_port_hw(hwif, &hw);
602 600
603 hwif->dev = dev;
604
605 /* If the user has selected DDMA assisted copies, 601 /* If the user has selected DDMA assisted copies,
606 then set up a few local I/O function entry points 602 then set up a few local I/O function entry points
607 */ 603 */
@@ -610,11 +606,8 @@ static int au_ide_probe(struct device *dev)
610 hwif->input_data = au1xxx_input_data; 606 hwif->input_data = au1xxx_input_data;
611 hwif->output_data = au1xxx_output_data; 607 hwif->output_data = au1xxx_output_data;
612#endif 608#endif
613 hwif->select_data = 0; /* no chipset-specific code */
614 hwif->config_data = 0; /* no chipset-specific code */
615 609
616 auide_hwif.hwif = hwif; 610 auide_hwif.hwif = hwif;
617 hwif->hwif_data = &auide_hwif;
618 611
619 idx[0] = hwif->index; 612 idx[0] = hwif->index;
620 613