projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge ../linux-2.6
[powerpc.git]
/
drivers
/
net
/
smc91x.c
diff --git
a/drivers/net/smc91x.c
b/drivers/net/smc91x.c
index
1438fdd
..
74d5f1a
100644
(file)
--- a/
drivers/net/smc91x.c
+++ b/
drivers/net/smc91x.c
@@
-77,7
+77,7
@@
static const char version[] =
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/crc32.h>
#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>
#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);
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;
/* Set default parameters */
lp->msg_enable = NETIF_MSG_LINK;
lp->ctl_rfduplx = 0;
@@
-2291,11
+2295,11
@@
static int smc_drv_remove(struct device *dev)
return 0;
}
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);
{
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);
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;
}
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);
{
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)) {
struct smc_local *lp = netdev_priv(ndev);
smc_enable_device(pdev);
if (netif_running(ndev)) {