Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166103
b: refs/heads/master
c: 43ddc00
h: refs/heads/master
i:
  166101: e86503e
  166099: f28bd29
  166095: c4076e5
v: v3
  • Loading branch information
Mike Rapoport authored and Eric Miao committed Sep 10, 2009
1 parent 0307d3a commit f7a8262
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 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: 5d027cd222a052923a511ba693b60e512b3866f2
refs/heads/master: 43ddc00696c96a265a7fc48050b32fd0ed9d59e7
20 changes: 12 additions & 8 deletions trunk/drivers/video/backlight/da903x_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,34 +154,38 @@ static int da903x_backlight_remove(struct platform_device *pdev)
}

#ifdef CONFIG_PM
static int da903x_backlight_suspend(struct platform_device *pdev,
pm_message_t state)
static int da903x_backlight_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct backlight_device *bl = platform_get_drvdata(pdev);
return da903x_backlight_set(bl, 0);
}

static int da903x_backlight_resume(struct platform_device *pdev)
static int da903x_backlight_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct backlight_device *bl = platform_get_drvdata(pdev);

backlight_update_status(bl);
return 0;
}
#else
#define da903x_backlight_suspend NULL
#define da903x_backlight_resume NULL

static struct dev_pm_ops da903x_backlight_pm_ops = {
.suspend = da903x_backlight_suspend,
.resume = da903x_backlight_resume,
};
#endif

static struct platform_driver da903x_backlight_driver = {
.driver = {
.name = "da903x-backlight",
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &da903x_backlight_pm_ops,
#endif
},
.probe = da903x_backlight_probe,
.remove = da903x_backlight_remove,
.suspend = da903x_backlight_suspend,
.resume = da903x_backlight_resume,
};

static int __init da903x_backlight_init(void)
Expand Down

0 comments on commit f7a8262

Please sign in to comment.