Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e295e8508c1dd56e06c73e78a2f67f2eb563e74f Commit: e295e8508c1dd56e06c73e78a2f67f2eb563e74f Parent: 1a343760b516ca5466d201bec32b1794858b18a5 Author: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> AuthorDate: Wed Jul 18 23:45:37 2007 -0300 Committer: Len Brown <[EMAIL PROTECTED]> CommitDate: Sat Jul 21 23:46:08 2007 -0400
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 <[EMAIL PROTECTED]> Signed-off-by: Len Brown <[EMAIL PROTECTED]> --- drivers/misc/thinkpad_acpi.c | 16 ++++++++++++++++ drivers/misc/thinkpad_acpi.h | 1 + 2 files changed, 17 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, }; diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h index 00f1bd7..c5c1316 100644 --- a/drivers/misc/thinkpad_acpi.h +++ b/drivers/misc/thinkpad_acpi.h @@ -205,6 +205,7 @@ struct ibm_struct { int (*read) (char *); int (*write) (char *); void (*exit) (void); + void (*resume) (void); struct list_head all_drivers; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html