summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/pci.c
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-07-24 19:27:20 +0800
committerKalle Valo <kvalo@codeaurora.org>2019-09-23 11:25:22 +0300
commit5d7e4b4935e435d7e7be9f7746d4cff31a5cb94a (patch)
tree2ca99efe7b4547c069f6daad8757d3d8b2710e39 /drivers/net/wireless/ath/ath5k/pci.c
parent80ce8ca7a6473730a6847046651aab81cdb96898 (diff)
downloadlinux-5d7e4b4935e435d7e7be9f7746d4cff31a5cb94a.tar.bz2
ath: Use dev_get_drvdata where possible
Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/pci.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c
index c6156cc38940..e1378e203611 100644
--- a/drivers/net/wireless/ath/ath5k/pci.c
+++ b/drivers/net/wireless/ath/ath5k/pci.c
@@ -301,8 +301,7 @@ ath5k_pci_remove(struct pci_dev *pdev)
#ifdef CONFIG_PM_SLEEP
static int ath5k_pci_suspend(struct device *dev)
{
- struct pci_dev *pdev = to_pci_dev(dev);
- struct ieee80211_hw *hw = pci_get_drvdata(pdev);
+ struct ieee80211_hw *hw = dev_get_drvdata(dev);
struct ath5k_hw *ah = hw->priv;
ath5k_led_off(ah);