au1xxx-ide: don't use hwif->hwif_data
* 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. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
c56c5648a3
commit
a536f326a2
|
@ -213,10 +213,8 @@ static int auide_build_dmatable(ide_drive_t *drive)
|
||||||
{
|
{
|
||||||
int i, iswrite, count = 0;
|
int i, iswrite, count = 0;
|
||||||
ide_hwif_t *hwif = HWIF(drive);
|
ide_hwif_t *hwif = HWIF(drive);
|
||||||
|
|
||||||
struct request *rq = HWGROUP(drive)->rq;
|
struct request *rq = HWGROUP(drive)->rq;
|
||||||
|
_auide_hwif *ahwif = &auide_hwif;
|
||||||
_auide_hwif *ahwif = (_auide_hwif*)hwif->hwif_data;
|
|
||||||
struct scatterlist *sg;
|
struct scatterlist *sg;
|
||||||
|
|
||||||
iswrite = (rq_data_dir(rq) == WRITE);
|
iswrite = (rq_data_dir(rq) == WRITE);
|
||||||
|
@ -402,7 +400,7 @@ static const struct ide_dma_ops au1xxx_dma_ops = {
|
||||||
|
|
||||||
static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *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;
|
dbdev_tab_t source_dev_tab, target_dev_tab;
|
||||||
u32 dev_id, tsize, devwidth, flags;
|
u32 dev_id, tsize, devwidth, flags;
|
||||||
|
|
||||||
|
@ -463,7 +461,7 @@ static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
|
||||||
#else
|
#else
|
||||||
static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *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;
|
dbdev_tab_t source_dev_tab;
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
|
@ -608,11 +606,8 @@ static int au_ide_probe(struct device *dev)
|
||||||
hwif->input_data = au1xxx_input_data;
|
hwif->input_data = au1xxx_input_data;
|
||||||
hwif->output_data = au1xxx_output_data;
|
hwif->output_data = au1xxx_output_data;
|
||||||
#endif
|
#endif
|
||||||
hwif->select_data = 0; /* no chipset-specific code */
|
|
||||||
hwif->config_data = 0; /* no chipset-specific code */
|
|
||||||
|
|
||||||
auide_hwif.hwif = hwif;
|
auide_hwif.hwif = hwif;
|
||||||
hwif->hwif_data = &auide_hwif;
|
|
||||||
|
|
||||||
idx[0] = hwif->index;
|
idx[0] = hwif->index;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue