|
@@ -123,21 +123,21 @@ static void iwl_pci_apm_config(struct iwl_bus *bus)
|
|
|
if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) ==
|
|
|
PCI_CFG_LINK_CTRL_VAL_L1_EN) {
|
|
|
/* L1-ASPM enabled; disable(!) L0S */
|
|
|
- iwl_set_bit(bus->drv_data, CSR_GIO_REG,
|
|
|
+ iwl_set_bit(priv(bus), CSR_GIO_REG,
|
|
|
CSR_GIO_REG_VAL_L0S_ENABLED);
|
|
|
dev_printk(KERN_INFO, bus->dev, "L1 Enabled; Disabling L0S\n");
|
|
|
} else {
|
|
|
/* L1-ASPM disabled; enable(!) L0S */
|
|
|
- iwl_clear_bit(bus->drv_data, CSR_GIO_REG,
|
|
|
+ iwl_clear_bit(priv(bus), CSR_GIO_REG,
|
|
|
CSR_GIO_REG_VAL_L0S_ENABLED);
|
|
|
dev_printk(KERN_INFO, bus->dev, "L1 Disabled; Enabling L0S\n");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static void iwl_pci_set_drv_data(struct iwl_bus *bus, void *drv_data)
|
|
|
+static void iwl_pci_set_drv_data(struct iwl_bus *bus, struct iwl_shared *shrd)
|
|
|
{
|
|
|
- bus->drv_data = drv_data;
|
|
|
- pci_set_drvdata(IWL_BUS_GET_PCI_DEV(bus), drv_data);
|
|
|
+ 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[],
|
|
@@ -496,12 +496,12 @@ static void iwl_pci_down(struct iwl_bus *bus)
|
|
|
|
|
|
static void __devexit iwl_pci_remove(struct pci_dev *pdev)
|
|
|
{
|
|
|
- struct iwl_priv *priv = pci_get_drvdata(pdev);
|
|
|
- void *bus_specific = priv->bus->bus_specific;
|
|
|
+ struct iwl_shared *shrd = pci_get_drvdata(pdev);
|
|
|
+ struct iwl_bus *bus = shrd->bus;
|
|
|
|
|
|
- iwl_remove(priv);
|
|
|
+ iwl_remove(shrd->priv);
|
|
|
|
|
|
- iwl_pci_down(bus_specific);
|
|
|
+ iwl_pci_down(bus);
|
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_PM
|
|
@@ -509,20 +509,20 @@ 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_priv *priv = pci_get_drvdata(pdev);
|
|
|
+ struct iwl_shared *shrd = pci_get_drvdata(pdev);
|
|
|
|
|
|
/* 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
|
|
|
* WoWLAN is enabled - don't kill the NIC, someone may need it in Sx.
|
|
|
*/
|
|
|
|
|
|
- return iwl_suspend(priv);
|
|
|
+ return iwl_suspend(shrd->priv);
|
|
|
}
|
|
|
|
|
|
static int iwl_pci_resume(struct device *device)
|
|
|
{
|
|
|
struct pci_dev *pdev = to_pci_dev(device);
|
|
|
- struct iwl_priv *priv = pci_get_drvdata(pdev);
|
|
|
+ struct iwl_shared *shrd = pci_get_drvdata(pdev);
|
|
|
|
|
|
/* 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
|
|
@@ -535,7 +535,7 @@ static int iwl_pci_resume(struct device *device)
|
|
|
*/
|
|
|
pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00);
|
|
|
|
|
|
- return iwl_resume(priv);
|
|
|
+ return iwl_resume(shrd->priv);
|
|
|
}
|
|
|
|
|
|
static SIMPLE_DEV_PM_OPS(iwl_dev_pm_ops, iwl_pci_suspend, iwl_pci_resume);
|