[PATCH 7/9] au1xxx-ide: don't use hwif->hwif_data

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-ide@...>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@...>, <linux-kernel@...>
Date: Monday, June 2, 2008 - 4:23 pm

* Use &auide_hwif directly instead of using hwif->hwif_data.

While at it:

* No need to initialize hwif->{select,config}_data.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/mips/au1xxx-ide.c |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

Index: b/drivers/ide/mips/au1xxx-ide.c
===================================================================
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -213,10 +213,8 @@ static int auide_build_dmatable(ide_driv
 {
 	int i, iswrite, count = 0;
 	ide_hwif_t *hwif = HWIF(drive);
-
 	struct request *rq = HWGROUP(drive)->rq;
-
-	_auide_hwif *ahwif = (_auide_hwif*)hwif->hwif_data;
+	_auide_hwif *ahwif = &auide_hwif;
 	struct scatterlist *sg;
 
 	iswrite = (rq_data_dir(rq) == WRITE);
@@ -402,7 +400,7 @@ static const struct ide_dma_ops au1xxx_d
 
 static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
 {
-	_auide_hwif *auide = (_auide_hwif *)hwif->hwif_data;
+	_auide_hwif *auide = &auide_hwif;
 	dbdev_tab_t source_dev_tab, target_dev_tab;
 	u32 dev_id, tsize, devwidth, flags;
 
@@ -463,7 +461,7 @@ static int auide_ddma_init(ide_hwif_t *h
 #else
 static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
 {
-	_auide_hwif *auide = (_auide_hwif *)hwif->hwif_data;
+	_auide_hwif *auide = &auide_hwif;
 	dbdev_tab_t source_dev_tab;
 	int flags;
 
@@ -608,11 +606,8 @@ static int au_ide_probe(struct device *d
 	hwif->input_data  = au1xxx_input_data;
 	hwif->output_data = au1xxx_output_data;
 #endif
-	hwif->select_data               = 0;    /* no chipset-specific code */
-	hwif->config_data               = 0;    /* no chipset-specific code */
 
 	auide_hwif.hwif                 = hwif;
-	hwif->hwif_data                 = &auide_hwif;
 
 	idx[0] = hwif->index;
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/9] ide: fix host drivers missing hwif-&gt;chipset i..., Bartlomiej Zolnierkiewicz..., (Mon Jun 2, 4:22 pm)
[PATCH 9/9] ide-cs: use struct ide_port_info, Bartlomiej Zolnierkiewicz..., (Mon Jun 2, 4:24 pm)
[PATCH 8/9] ide_4drives: use struct ide_port_info, Bartlomiej Zolnierkiewicz..., (Mon Jun 2, 4:23 pm)
[PATCH 7/9] au1xxx-ide: don't use hwif->hwif_data, Bartlomiej Zolnierkiewicz..., (Mon Jun 2, 4:23 pm)
Re: [PATCH 7/9] au1xxx-ide: don't use hwif-&gt;hwif_data, Sergei Shtylyov, (Wed Jun 4, 5:43 am)
[PATCH 6/9] delkin_cb: add missing __init/__exit tags, Bartlomiej Zolnierkiewicz..., (Mon Jun 2, 4:23 pm)
Re: [PATCH 6/9] delkin_cb: add missing __init/__exit tags, Sergei Shtylyov, (Wed Jun 4, 5:42 am)
[PATCH 5/9] delkin_cb: add warm-plug support, Bartlomiej Zolnierkiewicz..., (Mon Jun 2, 4:23 pm)
[PATCH 4/9] delkin_cb: use struct ide_port_info, Bartlomiej Zolnierkiewicz..., (Mon Jun 2, 4:23 pm)
[PATCH 3/9] delkin_cb: set proper hwif-&gt;gendev.parent value, Bartlomiej Zolnierkiewicz..., (Mon Jun 2, 4:23 pm)
[PATCH 2/9] ide: set hwif-&gt;dev in ide_init_port_hw(), Bartlomiej Zolnierkiewicz..., (Mon Jun 2, 4:23 pm)