From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: "Greg Kroah-Hartman" <gregkh@suse.de>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 13/18] Staging: rtl8187se: cleanup r8180_pm.c
Date: Sun, 28 Jun 2009 16:20:04 +0200 [thread overview]
Message-ID: <20090628142004.8761.31645.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20090628141844.8761.8943.sendpatchset@localhost.localdomain>
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] Staging: rtl8187se: cleanup r8180_pm.c
* remove unused rtl8180_{save_state,enable_wake}()
* remove commented out code
* beautify code
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/staging/rtl8187se/r8180_pm.c | 32 ++++++++------------------------
drivers/staging/rtl8187se/r8180_pm.h | 2 --
2 files changed, 8 insertions(+), 26 deletions(-)
Index: b/drivers/staging/rtl8187se/r8180_pm.c
===================================================================
--- a/drivers/staging/rtl8187se/r8180_pm.c
+++ b/drivers/staging/rtl8187se/r8180_pm.c
@@ -15,16 +15,9 @@
#include "r8180_pm.h"
#include "r8180.h"
-int rtl8180_save_state (struct pci_dev *dev, u32 state)
-{
- printk(KERN_NOTICE "r8180 save state call (state %u).\n", state);
- return(-EAGAIN);
-}
-
-int rtl8180_suspend (struct pci_dev *pdev, pm_message_t state)
+int rtl8180_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct net_device *dev = pci_get_drvdata(pdev);
-// struct r8180_priv *priv = ieee80211_priv(dev);
if (!netif_running(dev))
goto out_pci_suspend;
@@ -37,27 +30,28 @@ int rtl8180_suspend (struct pci_dev *pde
out_pci_suspend:
pci_save_state(pdev);
pci_disable_device(pdev);
- pci_set_power_state(pdev,pci_choose_state(pdev,state));
+ pci_set_power_state(pdev, pci_choose_state(pdev, state));
return 0;
}
-int rtl8180_resume (struct pci_dev *pdev)
+int rtl8180_resume(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
-// struct r8180_priv *priv = ieee80211_priv(dev);
int err;
u32 val;
pci_set_power_state(pdev, PCI_D0);
err = pci_enable_device(pdev);
- if(err) {
+ if (err) {
printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
dev->name);
return err;
}
+
pci_restore_state(pdev);
+
/*
* Suspend/Resume resets the PCI configuration space, so we have to
* re-disable the RETRY_TIMEOUT register (0x41) to keep PCI Tx retries
@@ -68,23 +62,13 @@ int rtl8180_resume (struct pci_dev *pdev
if ((val & 0x0000ff00) != 0)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
- if(!netif_running(dev))
+ if (!netif_running(dev))
goto out;
if (dev->netdev_ops->ndo_open)
dev->netdev_ops->ndo_open(dev);
+
netif_device_attach(dev);
out:
return 0;
}
-
-
-int rtl8180_enable_wake (struct pci_dev *dev, u32 state, int enable)
-{
- printk(KERN_NOTICE "r8180 enable wake call (state %u, enable %d).\n",
- state, enable);
- return(-EAGAIN);
-}
-
-
-
Index: b/drivers/staging/rtl8187se/r8180_pm.h
===================================================================
--- a/drivers/staging/rtl8187se/r8180_pm.h
+++ b/drivers/staging/rtl8187se/r8180_pm.h
@@ -17,10 +17,8 @@
#include <linux/types.h>
#include <linux/pci.h>
-int rtl8180_save_state (struct pci_dev *dev, u32 state);
int rtl8180_suspend (struct pci_dev *pdev, pm_message_t state);
int rtl8180_resume (struct pci_dev *pdev);
-int rtl8180_enable_wake (struct pci_dev *dev, u32 state, int enable);
#endif //R8180_PM_H
next prev parent reply other threads:[~2009-06-28 14:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-28 14:18 [PATCH 01/18] Staging: rtl8187se: remove ENABLE_DOT11D ifdefs Bartlomiej Zolnierkiewicz
2009-06-28 14:18 ` [PATCH 02/18] Staging: rtl8187se: remove CONFIG_RTL8180_PM ifdefs Bartlomiej Zolnierkiewicz
2009-06-28 14:18 ` [PATCH 03/18] Staging: rtl8187se: remove THOMAS_TURBO ifdefs Bartlomiej Zolnierkiewicz
2009-06-28 14:19 ` [PATCH 04/18] Staging: rtl8187se: remove CONFIG_RTL818x_S ifdefs Bartlomiej Zolnierkiewicz
2009-06-28 14:19 ` [PATCH 05/18] Staging: rtl8187se: remove CONFIG_RTL8185B ifdefs Bartlomiej Zolnierkiewicz
2009-06-28 14:19 ` [PATCH 06/18] Staging: rtl8187se: remove CONFIG_RTL8180_IO_MAP ifdefs Bartlomiej Zolnierkiewicz
2009-06-28 14:19 ` [PATCH 07/18] Staging: rtl8187se: remove dead code Bartlomiej Zolnierkiewicz
2009-06-28 14:19 ` [PATCH 08/18] Staging: rtl8187se: remove unused radio frontends Bartlomiej Zolnierkiewicz
2009-06-28 14:19 ` [PATCH 09/18] Staging: rtl8187se: remove debugging code from r8180_core.c Bartlomiej Zolnierkiewicz
2009-06-28 14:19 ` [PATCH 10/18] Staging: rtl8187se: remove unused rtl8225_rf_* functions Bartlomiej Zolnierkiewicz
2009-06-28 14:19 ` [PATCH 11/18] Staging: rtl8187se: cleanup r8180_rtl8225.c Bartlomiej Zolnierkiewicz
2009-06-28 14:19 ` [PATCH 12/18] Staging: rtl8187se: merge r8180_rtl8225.c with r8180_rtl8225z2.c Bartlomiej Zolnierkiewicz
2009-06-28 14:20 ` Bartlomiej Zolnierkiewicz [this message]
2009-06-28 14:20 ` [PATCH 14/18] Staging: rtl8187se: merge r8180_pm.c with r8180_core.c Bartlomiej Zolnierkiewicz
2009-06-28 14:20 ` [PATCH 15/18] Staging: rtl8187se: remove unused definitions from r8180_hw.h Bartlomiej Zolnierkiewicz
2009-06-28 14:20 ` [PATCH 16/18] Staging: rtl8187se: remove unused definitions from r8180.h Bartlomiej Zolnierkiewicz
2009-06-28 14:20 ` [PATCH 17/18] Staging: rtl8187se: cleanup r8180_rtl8225z2.c Bartlomiej Zolnierkiewicz
2009-06-28 14:20 ` [PATCH 18/18] Staging: rtl8187se: cleanup r8180_core.c Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090628142004.8761.31645.sendpatchset@localhost.localdomain \
--to=bzolnier@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox