Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / drivers / net / macmace.c
index 57f7c1a..51ad376 100644 (file)
@@ -194,6 +194,7 @@ static int __devinit mace_probe(struct platform_device *pdev)
        unsigned char checksum = 0;
        static int found = 0;
        int err;
+       DECLARE_MAC_BUF(mac);
 
        if (found || macintosh_config->ether_type != MAC_ETHER_MACE)
                return -ENODEV;
@@ -248,9 +249,8 @@ static int __devinit mace_probe(struct platform_device *pdev)
        dev->set_multicast_list = mace_set_multicast;
        dev->set_mac_address    = mace_set_address;
 
-       printk(KERN_INFO "%s: 68K MACE, hardware address %.2X", dev->name, dev->dev_addr[0]);
-       for (j = 1 ; j < 6 ; j++) printk(":%.2X", dev->dev_addr[j]);
-       printk("\n");
+       printk(KERN_INFO "%s: 68K MACE, hardware address %s\n",
+              dev->name, print_mac(mac, dev->dev_addr));
 
        err = register_netdev(dev);
        if (!err)
@@ -538,8 +538,9 @@ static void mace_set_multicast(struct net_device *dev)
        local_irq_restore(flags);
 }
 
-static void mace_handle_misc_intrs(struct mace_data *mp, int intr)
+static void mace_handle_misc_intrs(struct net_device *dev, int intr)
 {
+       struct mace_data *mp = netdev_priv(dev);
        volatile struct mace *mb = mp->mace;
        static int mace_babbles, mace_jabbers;
 
@@ -571,7 +572,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id)
        local_irq_save(flags);
 
        intr = mb->ir; /* read interrupt register */
-       mace_handle_misc_intrs(mp, intr);
+       mace_handle_misc_intrs(dev, intr);
 
        if (intr & XMTINT) {
                fs = mb->xmtfs;
@@ -645,7 +646,6 @@ static void mace_tx_timeout(struct net_device *dev)
 
 static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf)
 {
-       struct mace_data *mp = netdev_priv(dev);
        struct sk_buff *skb;
        unsigned int frame_status = mf->rcvsts;
 
@@ -781,6 +781,9 @@ static int __init mac_mace_init_module(void)
 {
        int err;
 
+       if (!MACH_IS_MAC)
+               return -ENODEV;
+
        if ((err = platform_driver_register(&mac_mace_driver))) {
                printk(KERN_ERR "Driver registration failed\n");
                return err;