Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365654
b: refs/heads/master
c: 07cac9d
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Apr 30, 2013
1 parent c523038 commit 9e54786
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 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: 46e1915eef9c0e935a09808a30e167abb857b4ec
refs/heads/master: 07cac9d78fcc9a0a3dd7c5b8523371f4d8cae591
22 changes: 10 additions & 12 deletions trunk/drivers/video/backlight/omap1_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,24 @@ static void omapbl_blank(struct omap_backlight *bl, int mode)
}
}

#ifdef CONFIG_PM
static int omapbl_suspend(struct platform_device *pdev, pm_message_t state)
#ifdef CONFIG_PM_SLEEP
static int omapbl_suspend(struct device *dev)
{
struct backlight_device *dev = platform_get_drvdata(pdev);
struct omap_backlight *bl = bl_get_data(dev);
struct backlight_device *bl_dev = dev_get_drvdata(dev);
struct omap_backlight *bl = bl_get_data(bl_dev);

omapbl_blank(bl, FB_BLANK_POWERDOWN);
return 0;
}

static int omapbl_resume(struct platform_device *pdev)
static int omapbl_resume(struct device *dev)
{
struct backlight_device *dev = platform_get_drvdata(pdev);
struct omap_backlight *bl = bl_get_data(dev);
struct backlight_device *bl_dev = dev_get_drvdata(dev);
struct omap_backlight *bl = bl_get_data(bl_dev);

omapbl_blank(bl, bl->powermode);
return 0;
}
#else
#define omapbl_suspend NULL
#define omapbl_resume NULL
#endif

static int omapbl_set_power(struct backlight_device *dev, int state)
Expand Down Expand Up @@ -182,13 +179,14 @@ static int omapbl_remove(struct platform_device *pdev)
return 0;
}

static SIMPLE_DEV_PM_OPS(omapbl_pm_ops, omapbl_suspend, omapbl_resume);

static struct platform_driver omapbl_driver = {
.probe = omapbl_probe,
.remove = omapbl_remove,
.suspend = omapbl_suspend,
.resume = omapbl_resume,
.driver = {
.name = "omap-bl",
.pm = &omapbl_pm_ops,
},
};

Expand Down

0 comments on commit 9e54786

Please sign in to comment.