diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2007-07-18 23:45:37 -0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-07-21 23:46:08 -0400 |
commit | e295e8508c1dd56e06c73e78a2f67f2eb563e74f (patch) | |
tree | 076ac3317d2158e76d1326912f190c354f895b65 /drivers/misc/thinkpad_acpi.c | |
parent | 1a343760b516ca5466d201bec32b1794858b18a5 (diff) | |
download | kernel_samsung_crespo-e295e8508c1dd56e06c73e78a2f67f2eb563e74f.zip kernel_samsung_crespo-e295e8508c1dd56e06c73e78a2f67f2eb563e74f.tar.gz kernel_samsung_crespo-e295e8508c1dd56e06c73e78a2f67f2eb563e74f.tar.bz2 |
ACPI: thinkpad-acpi: add power-management handler capability
Some subdrivers could benefit from resume handling, so add the
infrastructure for simple resume handling.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc/thinkpad_acpi.c')
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index c86b228..78914bf 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c @@ -519,11 +519,27 @@ static struct platform_device *tpacpi_pdev; static struct class_device *tpacpi_hwmon; static struct input_dev *tpacpi_inputdev; + +static int tpacpi_resume_handler(struct platform_device *pdev) +{ + struct ibm_struct *ibm, *itmp; + + list_for_each_entry_safe(ibm, itmp, + &tpacpi_all_drivers, + all_drivers) { + if (ibm->resume) + (ibm->resume)(); + } + + return 0; +} + static struct platform_driver tpacpi_pdriver = { .driver = { .name = IBM_DRVR_NAME, .owner = THIS_MODULE, }, + .resume = tpacpi_resume_handler, }; |