mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
PCI: remove useless pci driver method
Remove pointless and never-called enable_wake() hook from pci_driver and from documentation. Evidently this was introduced in the 2.4.6 kernel, but there's no evidence it was ever called; and it was rarely implemented. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
e57571a07d
commit
56906c612e
8 changed files with 0 additions and 64 deletions
|
@ -113,9 +113,6 @@ initialization with a pointer to a structure describing the driver
|
||||||
(Please see Documentation/power/pci.txt for descriptions
|
(Please see Documentation/power/pci.txt for descriptions
|
||||||
of PCI Power Management and the related functions.)
|
of PCI Power Management and the related functions.)
|
||||||
|
|
||||||
enable_wake Enable device to generate wake events from a low power
|
|
||||||
state.
|
|
||||||
|
|
||||||
shutdown Hook into reboot_notifier_list (kernel/sys.c).
|
shutdown Hook into reboot_notifier_list (kernel/sys.c).
|
||||||
Intended to stop any idling DMA operations.
|
Intended to stop any idling DMA operations.
|
||||||
Useful for enabling wake-on-lan (NIC) or changing
|
Useful for enabling wake-on-lan (NIC) or changing
|
||||||
|
|
|
@ -164,7 +164,6 @@ struct pci_driver:
|
||||||
|
|
||||||
int (*suspend) (struct pci_dev *dev, pm_message_t state);
|
int (*suspend) (struct pci_dev *dev, pm_message_t state);
|
||||||
int (*resume) (struct pci_dev *dev);
|
int (*resume) (struct pci_dev *dev);
|
||||||
int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable);
|
|
||||||
|
|
||||||
|
|
||||||
suspend
|
suspend
|
||||||
|
@ -251,42 +250,6 @@ The driver should update the current_state field in its pci_dev structure in
|
||||||
this function, except for PM-capable devices when pci_set_power_state is used.
|
this function, except for PM-capable devices when pci_set_power_state is used.
|
||||||
|
|
||||||
|
|
||||||
enable_wake
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
|
|
||||||
if (dev->driver && dev->driver->enable_wake)
|
|
||||||
dev->driver->enable_wake(dev,state,enable);
|
|
||||||
|
|
||||||
This callback is generally only relevant for devices that support the PCI PM
|
|
||||||
spec and have the ability to generate a PME# (Power Management Event Signal)
|
|
||||||
to wake the system up. (However, it is possible that a device may support
|
|
||||||
some non-standard way of generating a wake event on sleep.)
|
|
||||||
|
|
||||||
Bits 15:11 of the PMC (Power Mgmt Capabilities) Register in a device's
|
|
||||||
PM Capabilities describe what power states the device supports generating a
|
|
||||||
wake event from:
|
|
||||||
|
|
||||||
+------------------+
|
|
||||||
| Bit | State |
|
|
||||||
+------------------+
|
|
||||||
| 11 | D0 |
|
|
||||||
| 12 | D1 |
|
|
||||||
| 13 | D2 |
|
|
||||||
| 14 | D3hot |
|
|
||||||
| 15 | D3cold |
|
|
||||||
+------------------+
|
|
||||||
|
|
||||||
A device can use this to enable wake events:
|
|
||||||
|
|
||||||
pci_enable_wake(dev,state,enable);
|
|
||||||
|
|
||||||
Note that to enable PME# from D3cold, a value of 4 should be passed to
|
|
||||||
pci_enable_wake (since it uses an index into a bitmask). If a driver gets
|
|
||||||
a request to enable wake events from D3, two calls should be made to
|
|
||||||
pci_enable_wake (one for both D3hot and D3cold).
|
|
||||||
|
|
||||||
|
|
||||||
A reference implementation
|
A reference implementation
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
|
@ -2267,12 +2267,6 @@ need_resume:
|
||||||
typhoon_resume(pdev);
|
typhoon_resume(pdev);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
typhoon_enable_wake(struct pci_dev *pdev, pci_power_t state, int enable)
|
|
||||||
{
|
|
||||||
return pci_enable_wake(pdev, state, enable);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int __devinit
|
static int __devinit
|
||||||
|
@ -2636,7 +2630,6 @@ static struct pci_driver typhoon_driver = {
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
.suspend = typhoon_suspend,
|
.suspend = typhoon_suspend,
|
||||||
.resume = typhoon_resume,
|
.resume = typhoon_resume,
|
||||||
.enable_wake = typhoon_enable_wake,
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -453,8 +453,6 @@ static struct pci_driver prism2_pci_drv_id = {
|
||||||
.suspend = prism2_pci_suspend,
|
.suspend = prism2_pci_suspend,
|
||||||
.resume = prism2_pci_resume,
|
.resume = prism2_pci_resume,
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
/* Linux 2.4.6 added save_state and enable_wake that are not used here
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -613,9 +613,6 @@ static struct pci_driver prism2_plx_drv_id = {
|
||||||
.id_table = prism2_plx_id_table,
|
.id_table = prism2_plx_id_table,
|
||||||
.probe = prism2_plx_probe,
|
.probe = prism2_plx_probe,
|
||||||
.remove = prism2_plx_remove,
|
.remove = prism2_plx_remove,
|
||||||
.suspend = NULL,
|
|
||||||
.resume = NULL,
|
|
||||||
.enable_wake = NULL
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,6 @@ static struct pci_driver prism54_driver = {
|
||||||
.remove = prism54_remove,
|
.remove = prism54_remove,
|
||||||
.suspend = prism54_suspend,
|
.suspend = prism54_suspend,
|
||||||
.resume = prism54_resume,
|
.resume = prism54_resume,
|
||||||
/* .enable_wake ; we don't support this yet */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
|
@ -3487,15 +3487,6 @@ static int nsp32_resume(struct pci_dev *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable wake event */
|
|
||||||
static int nsp32_enable_wake(struct pci_dev *pdev, pci_power_t state, int enable)
|
|
||||||
{
|
|
||||||
struct Scsi_Host *host = pci_get_drvdata(pdev);
|
|
||||||
|
|
||||||
nsp32_msg(KERN_INFO, "pci-enable_wake: stub, pdev=0x%p, enable=%d, slot=%s, host=0x%p", pdev, enable, pci_name(pdev), host);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
@ -3571,7 +3562,6 @@ static struct pci_driver nsp32_driver = {
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
.suspend = nsp32_suspend,
|
.suspend = nsp32_suspend,
|
||||||
.resume = nsp32_resume,
|
.resume = nsp32_resume,
|
||||||
.enable_wake = nsp32_enable_wake,
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -371,7 +371,6 @@ struct pci_driver {
|
||||||
int (*suspend_late) (struct pci_dev *dev, pm_message_t state);
|
int (*suspend_late) (struct pci_dev *dev, pm_message_t state);
|
||||||
int (*resume_early) (struct pci_dev *dev);
|
int (*resume_early) (struct pci_dev *dev);
|
||||||
int (*resume) (struct pci_dev *dev); /* Device woken up */
|
int (*resume) (struct pci_dev *dev); /* Device woken up */
|
||||||
int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */
|
|
||||||
void (*shutdown) (struct pci_dev *dev);
|
void (*shutdown) (struct pci_dev *dev);
|
||||||
|
|
||||||
struct pci_error_handlers *err_handler;
|
struct pci_error_handlers *err_handler;
|
||||||
|
|
Loading…
Reference in a new issue