]> err.no Git - linux-2.6/blobdiff - drivers/net/smc911x.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[linux-2.6] / drivers / net / smc911x.c
index 76cc1d3adf715fc635a58db2c2b9df40789f7a56..4e28002051899c21f0a6050b5b32f14b6f2c6dec 100644 (file)
@@ -92,6 +92,7 @@ module_param(tx_fifo_kb, int, 0400);
 MODULE_PARM_DESC(tx_fifo_kb,"transmit FIFO size in KB (1<x<15)(default=8)");
 
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:smc911x");
 
 /*
  * The internal workings of the driver.  If you are changing anything
@@ -243,7 +244,7 @@ static void smc911x_reset(struct net_device *dev)
                do {
                        udelay(10);
                        reg = SMC_GET_PMT_CTRL() & PMT_CTRL_READY_;
-               } while ( timeout-- && !reg);
+               } while (--timeout && !reg);
                if (timeout == 0) {
                        PRINTK("%s: smc911x_reset timeout waiting for PM restore\n", dev->name);
                        return;
@@ -267,7 +268,7 @@ static void smc911x_reset(struct net_device *dev)
                                resets++;
                                break;
                        }
-               } while ( timeout-- && (reg & HW_CFG_SRST_));
+               } while (--timeout && (reg & HW_CFG_SRST_));
        }
        if (timeout == 0) {
                PRINTK("%s: smc911x_reset timeout waiting for reset\n", dev->name);
@@ -413,7 +414,7 @@ static inline void smc911x_drop_pkt(struct net_device *dev)
                do {
                        udelay(10);
                        reg = SMC_GET_RX_DP_CTRL() & RX_DP_CTRL_FFWD_BUSY_;
-               } while ( timeout-- && reg);
+               } while (--timeout && reg);
                if (timeout == 0) {
                        PRINTK("%s: timeout waiting for RX fast forward\n", dev->name);
                }
@@ -2262,6 +2263,7 @@ static struct platform_driver smc911x_driver = {
        .resume  = smc911x_drv_resume,
        .driver  = {
                .name    = CARDNAME,
+               .owner  = THIS_MODULE,
        },
 };