]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/arm/am79c961a.c
ep93xx: some minor cleanups to the ep93xx eth driver
[linux-2.6-omap-h63xx.git] / drivers / net / arm / am79c961a.c
index 877891a29aaac297fcf88542c8ea6159d97f1377..ddd12d44ff22dab8d7ab7b3ec44e323311af46a7 100644 (file)
@@ -38,7 +38,7 @@
 #include "am79c961a.h"
 
 static irqreturn_t
-am79c961_interrupt (int irq, void *dev_id, struct pt_regs *regs);
+am79c961_interrupt (int irq, void *dev_id);
 
 static unsigned int net_debug = NET_DEBUG;
 
@@ -596,7 +596,7 @@ am79c961_tx(struct net_device *dev, struct dev_priv *priv)
 }
 
 static irqreturn_t
-am79c961_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+am79c961_interrupt(int irq, void *dev_id)
 {
        struct net_device *dev = (struct net_device *)dev_id;
        struct dev_priv *priv = netdev_priv(dev);
@@ -668,9 +668,8 @@ static void __init am79c961_banner(void)
                printk(KERN_INFO "%s", version);
 }
 
-static int __init am79c961_probe(struct device *_dev)
+static int __init am79c961_probe(struct platform_device *pdev)
 {
-       struct platform_device *pdev = to_platform_device(_dev);
        struct resource *res;
        struct net_device *dev;
        struct dev_priv *priv;
@@ -697,7 +696,9 @@ static int __init am79c961_probe(struct device *_dev)
        dev->base_addr = res->start;
        dev->irq = platform_get_irq(pdev, 0);
 
-       ret = -ENODEV;
+       ret = -ENODEV;
+       if (dev->irq < 0)
+               goto nodev;
        if (!request_region(dev->base_addr, 0x18, dev->name))
                goto nodev;
 
@@ -758,15 +759,16 @@ out:
        return ret;
 }
 
-static struct device_driver am79c961_driver = {
-       .name           = "am79c961",
-       .bus            = &platform_bus_type,
+static struct platform_driver am79c961_driver = {
        .probe          = am79c961_probe,
+       .driver         = {
+               .name   = "am79c961",
+       },
 };
 
 static int __init am79c961_init(void)
 {
-       return driver_register(&am79c961_driver);
+       return platform_driver_register(&am79c961_driver);
 }
 
 __initcall(am79c961_init);