diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-09-15 22:46:49 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-20 00:10:10 +0400 |
commit | 18d0077f0c4a3b88a04bf164db39671edafc30b8 (patch) | |
tree | 7f7b20b97d6f88a5326d73267670b17f798dcdf5 /drivers/net/wireless/iwlwifi/iwl-pci.c | |
parent | ca934b6715c134573da5acea01e9258eb0bf7c27 (diff) | |
download | linux-18d0077f0c4a3b88a04bf164db39671edafc30b8.tar.xz |
iwlagn: remove drvdata support from bus layer
Since the removal of the sysfs files, it is no
longer necessary to have upper layers control
the drvdata, so let the PCI driver have it for
itself completely.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-pci.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-pci.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c index 849b5ef71c35..23b5f78207ca 100644 --- a/drivers/net/wireless/iwlwifi/iwl-pci.c +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c @@ -134,12 +134,6 @@ static void iwl_pci_apm_config(struct iwl_bus *bus) } } -static void iwl_pci_set_drv_data(struct iwl_bus *bus, struct iwl_shared *shrd) -{ - bus->shrd = shrd; - pci_set_drvdata(IWL_BUS_GET_PCI_DEV(bus), shrd); -} - static void iwl_pci_get_hw_id(struct iwl_bus *bus, char buf[], int buf_len) { @@ -168,7 +162,6 @@ static u32 iwl_pci_read32(struct iwl_bus *bus, u32 ofs) static const struct iwl_bus_ops bus_ops_pci = { .get_pm_support = iwl_pci_is_pm_supported, .apm_config = iwl_pci_apm_config, - .set_drv_data = iwl_pci_set_drv_data, .get_hw_id = iwl_pci_get_hw_id, .write8 = iwl_pci_write8, .write32 = iwl_pci_write32, @@ -393,6 +386,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) pci_bus = IWL_BUS_GET_PCI_BUS(bus); pci_bus->pci_dev = pdev; + pci_set_drvdata(pdev, bus); + /* W/A - seems to solve weird behavior. We need to remove this if we * don't want to stay in L1 all the time. This wastes a lot of power */ pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 | @@ -486,9 +481,9 @@ out_no_pci: static void __devexit iwl_pci_remove(struct pci_dev *pdev) { - struct iwl_shared *shrd = pci_get_drvdata(pdev); - struct iwl_bus *bus = shrd->bus; + struct iwl_bus *bus = pci_get_drvdata(pdev); struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus); + struct iwl_shared *shrd = bus->shrd; iwl_remove(shrd->priv); @@ -506,7 +501,8 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev) static int iwl_pci_suspend(struct device *device) { struct pci_dev *pdev = to_pci_dev(device); - struct iwl_shared *shrd = pci_get_drvdata(pdev); + struct iwl_bus *bus = pci_get_drvdata(pdev); + struct iwl_shared *shrd = bus->shrd; /* Before you put code here, think about WoWLAN. You cannot check here * whether WoWLAN is enabled or not, and your code will run even if @@ -519,7 +515,8 @@ static int iwl_pci_suspend(struct device *device) static int iwl_pci_resume(struct device *device) { struct pci_dev *pdev = to_pci_dev(device); - struct iwl_shared *shrd = pci_get_drvdata(pdev); + struct iwl_bus *bus = pci_get_drvdata(pdev); + struct iwl_shared *shrd = bus->shrd; /* Before you put code here, think about WoWLAN. You cannot check here * whether WoWLAN is enabled or not, and your code will run even if |