Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316028
b: refs/heads/master
c: c248f24
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Guenter Roeck committed Jul 22, 2012
1 parent 30da3ea commit b7e7574
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f0928c6652d8b512f81002ebf66ef0b22cf1af4
refs/heads/master: c248f24cffc3d6692f428ccc9f2ba76cea1fa6ab
19 changes: 10 additions & 9 deletions trunk/drivers/hwmon/abituguru3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,10 +1141,10 @@ static struct abituguru3_data *abituguru3_update_device(struct device *dev)
return NULL;
}

#ifdef CONFIG_PM
static int abituguru3_suspend(struct platform_device *pdev, pm_message_t state)
#ifdef CONFIG_PM_SLEEP
static int abituguru3_suspend(struct device *dev)
{
struct abituguru3_data *data = platform_get_drvdata(pdev);
struct abituguru3_data *data = dev_get_drvdata(dev);
/*
* make sure all communications with the uguru3 are done and no new
* ones are started
Expand All @@ -1153,26 +1153,27 @@ static int abituguru3_suspend(struct platform_device *pdev, pm_message_t state)
return 0;
}

static int abituguru3_resume(struct platform_device *pdev)
static int abituguru3_resume(struct device *dev)
{
struct abituguru3_data *data = platform_get_drvdata(pdev);
struct abituguru3_data *data = dev_get_drvdata(dev);
mutex_unlock(&data->update_lock);
return 0;
}

static SIMPLE_DEV_PM_OPS(abituguru3_pm, abituguru3_suspend, abituguru3_resume);
#define ABIT_UGURU3_PM &abituguru3_pm
#else
#define abituguru3_suspend NULL
#define abituguru3_resume NULL
#define ABIT_UGURU3_PM NULL
#endif /* CONFIG_PM */

static struct platform_driver abituguru3_driver = {
.driver = {
.owner = THIS_MODULE,
.name = ABIT_UGURU3_NAME,
.pm = ABIT_UGURU3_PM
},
.probe = abituguru3_probe,
.remove = __devexit_p(abituguru3_remove),
.suspend = abituguru3_suspend,
.resume = abituguru3_resume
};

static int __init abituguru3_dmi_detect(void)
Expand Down

0 comments on commit b7e7574

Please sign in to comment.