]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlegacy: Use dev_get_drvdata where possible
authorChuhong Yuan <hslester96@gmail.com>
Wed, 24 Jul 2019 11:27:30 +0000 (19:27 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 6 Aug 2019 12:33:50 +0000 (15:33 +0300)
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>
drivers/net/wireless/intel/iwlegacy/common.c

index 4a88e35d58d7baa87bf463b81ff19248e809a410..73f7bbf742bc6434723202d4a964df91f51422d8 100644 (file)
@@ -4942,8 +4942,7 @@ EXPORT_SYMBOL(il_add_beacon_time);
 static int
 il_pci_suspend(struct device *device)
 {
-       struct pci_dev *pdev = to_pci_dev(device);
-       struct il_priv *il = pci_get_drvdata(pdev);
+       struct il_priv *il = dev_get_drvdata(device);
 
        /*
         * This function is called when system goes into suspend state