ide: move ide_rate_filter() calls to the upper layer (take 2)
[safe/jmp/linux-2.6] / drivers / ide / mips / swarm.c
index 66f6064..c2e2957 100644 (file)
@@ -4,6 +4,7 @@
  *     Author: Manish Lachwani, mlachwani@mvista.com
  * Copyright (C) 2004  MIPS Technologies, Inc.  All rights reserved.
  *     Author: Maciej W. Rozycki <macro@mips.com>
+ * Copyright (c) 2006  Maciej W. Rozycki
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -114,7 +115,7 @@ static int __devinit swarm_ide_probe(struct device *dev)
        /* Setup MMIO ops.  */
        default_hwif_mmiops(hwif);
        /* Prevent resource map manipulation.  */
-       hwif->mmio = 2;
+       hwif->mmio = 1;
        hwif->noprobe = 0;
 
        for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++)
@@ -127,6 +128,10 @@ static int __devinit swarm_ide_probe(struct device *dev)
        memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports));
        hwif->irq = hwif->hw.irq;
 
+       probe_hwif_init(hwif);
+
+       ide_proc_register_port(hwif);
+
        dev_set_drvdata(dev, hwif);
 
        return 0;
@@ -160,12 +165,11 @@ static int __devinit swarm_ide_init_module(void)
                goto out;
        }
 
-        if (!(pldev = kmalloc(sizeof (*pldev), GFP_KERNEL))) {
+        if (!(pldev = kzalloc(sizeof (*pldev), GFP_KERNEL))) {
                err = -ENOMEM;
                goto out_unregister_driver;
        }
 
-       memset (pldev, 0, sizeof (*pldev));
        pldev->name             = swarm_ide_string;
        pldev->id               = 0;
        pldev->dev.release      = swarm_ide_platform_release;