[PATCH 06/14] ide_platform: use struct ide_port_info

Bartlomiej Zolnierkiewicz
2008-06-10T20:51:43Z

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>
---
drivers/ide/legacy/ide_platform.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

Index: b/drivers/ide/legacy/ide_platform.c
===================================================================
--- a/drivers/ide/legacy/ide_platform.c
+++ b/drivers/ide/legacy/ide_platform.c
@@ -44,6 +44,10 @@ static void __devinit plat_ide_setup_por
hw->chipset = ide_generic;
}

+static const struct ide_port_info platform_ide_port_info = {
+ .host_flags = IDE_HFLAG_NO_DMA,
+};
+
static int __devinit plat_ide_probe(struct platform_device *pdev)
{
struct resource *res_base, *res_alt, *res_irq;
@@ -54,6 +58,7 @@ static int __devinit plat_ide_probe(stru
int ret = 0;
int mmio = 0;
hw_regs_t hw;
+ struct ide_port_info d = platform_ide_port_info;

pdata = pdev->dev.platform_data;

@@ -102,13 +107,13 @@ static int __devinit plat_ide_probe(stru
ide_init_port_hw(hwif, &hw);

if (mmio) {
- hwif->host_flags = IDE_HFLAG_MMIO;
+ d.host_flags |= IDE_HFLAG_MMIO;
default_hwif_mmiops(hwif);
}

idx[0] = hwif->index;

- ide_device_add(idx, NULL);
+ ide_device_add(idx, &d);

platform_set_drvdata(pdev, hwif);