]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/smc91x.c
Merge branch 'master' of /home/tglx/work/mtd/git/linux-2.6.git/
[linux-2.6-omap-h63xx.git] / drivers / net / smc91x.c
index cfb9d3cdb04a593713df0fabcf2f8359bdbc1b4d..74d5f1a6fdea262919736ebd9c86f45cd05d0a6e 100644 (file)
@@ -77,7 +77,7 @@ static const char version[] =
 #include <linux/errno.h>
 #include <linux/ioport.h>
 #include <linux/crc32.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
 #include <linux/spinlock.h>
 #include <linux/ethtool.h>
 #include <linux/mii.h>
@@ -1983,6 +1983,10 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
        if (lp->version >= (CHIP_91100 << 4))
                smc_phy_detect(dev);
 
+       /* then shut everything down to save power */
+       smc_shutdown(dev);
+       smc_phy_powerdown(dev);
+
        /* Set default parameters */
        lp->msg_enable = NETIF_MSG_LINK;
        lp->ctl_rfduplx = 0;
@@ -1998,7 +2002,7 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
        if (retval)
                goto err_out;
 
-       set_irq_type(dev->irq, IRQT_RISING);
+       set_irq_type(dev->irq, SMC_IRQ_TRIGGER_TYPE);
 
 #ifdef SMC_USE_PXA_DMA
        {
@@ -2291,11 +2295,11 @@ static int smc_drv_remove(struct device *dev)
        return 0;
 }
 
-static int smc_drv_suspend(struct device *dev, pm_message_t state, u32 level)
+static int smc_drv_suspend(struct device *dev, pm_message_t state)
 {
        struct net_device *ndev = dev_get_drvdata(dev);
 
-       if (ndev && level == SUSPEND_DISABLE) {
+       if (ndev) {
                if (netif_running(ndev)) {
                        netif_device_detach(ndev);
                        smc_shutdown(ndev);
@@ -2305,12 +2309,12 @@ static int smc_drv_suspend(struct device *dev, pm_message_t state, u32 level)
        return 0;
 }
 
-static int smc_drv_resume(struct device *dev, u32 level)
+static int smc_drv_resume(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);
        struct net_device *ndev = dev_get_drvdata(dev);
 
-       if (ndev && level == RESUME_ENABLE) {
+       if (ndev) {
                struct smc_local *lp = netdev_priv(ndev);
                smc_enable_device(pdev);
                if (netif_running(ndev)) {