Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=083f17606f624c79555e313d87cf37ac1486b073
Commit:     083f17606f624c79555e313d87cf37ac1486b073
Parent:     35ff8b9fa90d97f3a19ea3e2311385927535ebc9
Author:     Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 8 13:02:50 2008 -0200
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 22:26:07 2008 -0500

    ACPI: thinkpad-acpi: add suspend handler
    
    Add a handler for suspend events.
    
    Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/misc/thinkpad_acpi.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index dd6fa81..c6c25a4 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -188,6 +188,7 @@ struct ibm_struct {
        int (*write) (char *);
        void (*exit) (void);
        void (*resume) (void);
+       void (*suspend) (pm_message_t state);
 
        struct list_head all_drivers;
 
@@ -658,6 +659,21 @@ static struct input_dev *tpacpi_inputdev;
 static struct mutex tpacpi_inputdev_send_mutex;
 static LIST_HEAD(tpacpi_all_drivers);
 
+static int tpacpi_suspend_handler(struct platform_device *pdev,
+                                 pm_message_t state)
+{
+       struct ibm_struct *ibm, *itmp;
+
+       list_for_each_entry_safe(ibm, itmp,
+                                &tpacpi_all_drivers,
+                                all_drivers) {
+               if (ibm->suspend)
+                       (ibm->suspend)(state);
+       }
+
+       return 0;
+}
+
 static int tpacpi_resume_handler(struct platform_device *pdev)
 {
        struct ibm_struct *ibm, *itmp;
@@ -677,6 +693,7 @@ static struct platform_driver tpacpi_pdriver = {
                .name = TPACPI_DRVR_NAME,
                .owner = THIS_MODULE,
        },
+       .suspend = tpacpi_suspend_handler,
        .resume = tpacpi_resume_handler,
 };
 
-
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

Reply via email to