Skip to content

Commit 7b60fa1

Browse files
committed
ide_platform: use struct ide_port_info
Convert the driver to use struct ide_port_info. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
1 parent f81eb80 commit 7b60fa1

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎drivers/ide/legacy/ide_platform.c‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ static void __devinit plat_ide_setup_ports(hw_regs_t *hw,
4444
hw->chipset = ide_generic;
4545
}
4646

47+
static const struct ide_port_info platform_ide_port_info = {
48+
.host_flags = IDE_HFLAG_NO_DMA,
49+
};
50+
4751
static int __devinit plat_ide_probe(struct platform_device *pdev)
4852
{
4953
struct resource *res_base, *res_alt, *res_irq;
@@ -54,6 +58,7 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)
5458
int ret = 0;
5559
int mmio = 0;
5660
hw_regs_t hw;
61+
struct ide_port_info d = platform_ide_port_info;
5762

5863
pdata = pdev->dev.platform_data;
5964

@@ -102,13 +107,13 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)
102107
ide_init_port_hw(hwif, &hw);
103108

104109
if (mmio) {
105-
hwif->host_flags = IDE_HFLAG_MMIO;
110+
d.host_flags |= IDE_HFLAG_MMIO;
106111
default_hwif_mmiops(hwif);
107112
}
108113

109114
idx[0] = hwif->index;
110115

111-
ide_device_add(idx, NULL);
116+
ide_device_add(idx, &d);
112117

113118
platform_set_drvdata(pdev, hwif);
114119

0 commit comments

Comments
 (0)