aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/thinkpad_acpi.c16
-rw-r--r--drivers/misc/thinkpad_acpi.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index c86b228375cc..78914bf2166d 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -519,11 +519,27 @@ static struct platform_device *tpacpi_pdev;
519static struct class_device *tpacpi_hwmon; 519static struct class_device *tpacpi_hwmon;
520static struct input_dev *tpacpi_inputdev; 520static struct input_dev *tpacpi_inputdev;
521 521
522
523static int tpacpi_resume_handler(struct platform_device *pdev)
524{
525 struct ibm_struct *ibm, *itmp;
526
527 list_for_each_entry_safe(ibm, itmp,
528 &tpacpi_all_drivers,
529 all_drivers) {
530 if (ibm->resume)
531 (ibm->resume)();
532 }
533
534 return 0;
535}
536
522static struct platform_driver tpacpi_pdriver = { 537static struct platform_driver tpacpi_pdriver = {
523 .driver = { 538 .driver = {
524 .name = IBM_DRVR_NAME, 539 .name = IBM_DRVR_NAME,
525 .owner = THIS_MODULE, 540 .owner = THIS_MODULE,
526 }, 541 },
542 .resume = tpacpi_resume_handler,
527}; 543};
528 544
529 545
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index 00f1bd73df8f..c5c1316ae3a6 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -205,6 +205,7 @@ struct ibm_struct {
205 int (*read) (char *); 205 int (*read) (char *);
206 int (*write) (char *); 206 int (*write) (char *);
207 void (*exit) (void); 207 void (*exit) (void);
208 void (*resume) (void);
208 209
209 struct list_head all_drivers; 210 struct list_head all_drivers;
210 211