]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/bmac.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6-omap-h63xx.git] / drivers / net / bmac.c
index 00e5257b176f835a2842d7dd0ff854eeabc9c5b5..6fad83f24c4f5d08880baecc266c3f9f2c2732b7 100644 (file)
@@ -7,7 +7,6 @@
  * May 1999, Al Viro: proper release of /proc/net/bmac entry, switched to
  * dynamic procfs inode.
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
@@ -218,7 +217,7 @@ void bmwrite(struct net_device *dev, unsigned long reg_offset, unsigned data )
 
 
 static inline
-volatile unsigned short bmread(struct net_device *dev, unsigned long reg_offset )
+unsigned short bmread(struct net_device *dev, unsigned long reg_offset )
 {
        return in_le16((void __iomem *)dev->base_addr + reg_offset);
 }
@@ -1261,7 +1260,7 @@ static void bmac_reset_and_enable(struct net_device *dev)
        spin_unlock_irqrestore(&bp->lock, flags);
 }
 
-static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_match *match)
+static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_id *match)
 {
        int j, rev, ret;
        struct bmac_data *bp;
@@ -1645,22 +1644,20 @@ static int __devexit bmac_remove(struct macio_dev *mdev)
        return 0;
 }
 
-static struct of_match bmac_match[] = 
+static struct of_device_id bmac_match[] = 
 {
        {
        .name           = "bmac",
-       .type           = OF_ANY_MATCH,
-       .compatible     = OF_ANY_MATCH,
        .data           = (void *)0,
        },
        {
-       .name           = OF_ANY_MATCH,
        .type           = "network",
        .compatible     = "bmac+",
        .data           = (void *)1,
        },
        {},
 };
+MODULE_DEVICE_TABLE (of, bmac_match);
 
 static struct macio_driver bmac_driver = 
 {
@@ -1692,10 +1689,8 @@ static void __exit bmac_exit(void)
 {
        macio_unregister_driver(&bmac_driver);
 
-       if (bmac_emergency_rxbuf != NULL) {
-               kfree(bmac_emergency_rxbuf);
-               bmac_emergency_rxbuf = NULL;
-       }
+       kfree(bmac_emergency_rxbuf);
+       bmac_emergency_rxbuf = NULL;
 }
 
 MODULE_AUTHOR("Randy Gobbel/Paul Mackerras");