Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84080
b: refs/heads/master
c: 083f176
h: refs/heads/master
v: v3
  • Loading branch information
Henrique de Moraes Holschuh authored and Len Brown committed Feb 2, 2008
1 parent a53fea8 commit 3ff8e14
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35ff8b9fa90d97f3a19ea3e2311385927535ebc9
refs/heads/master: 083f17606f624c79555e313d87cf37ac1486b073
17 changes: 17 additions & 0 deletions trunk/drivers/misc/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand All @@ -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,
};

Expand Down

0 comments on commit 3ff8e14

Please sign in to comment.