diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-19 00:03:42 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-19 00:03:42 +0200 |
commit | bfaa07bc322085582bdc40babb9d0cce17b57380 (patch) | |
tree | 7e16d1fe32b68cb78d0a2fbe154345fbeb603648 /drivers/char/hw_random | |
parent | Merge branch 'pm-acpi' (diff) | |
parent | rtc-cmos: report wakeups from interrupt handler (diff) | |
download | linux-bfaa07bc322085582bdc40babb9d0cce17b57380.tar.xz linux-bfaa07bc322085582bdc40babb9d0cce17b57380.zip |
Merge branch 'pm-drivers'
* pm-drivers:
rtc-cmos: report wakeups from interrupt handler
PM / crypto / ux500: Use struct dev_pm_ops for power management
PM / IPMI: Remove empty legacy PCI PM callbacks
tpm_nsc: Use struct dev_pm_ops for power management
tpm_tis: Use struct dev_pm_ops for power management
tpm_atmel: Use struct dev_pm_ops for power management
PM / TPM: Drop unused pm_message_t argument from tpm_pm_suspend()
omap-rng: Use struct dev_pm_ops for power management
mg_disk: Use struct dev_pm_ops for power management
msi-laptop: Use struct dev_pm_ops for power management
hdaps: Use struct dev_pm_ops for power management
sonypi: Use struct dev_pm_ops for power management
intel_mid_thermal: Use struct dev_pm_ops for power management
acer-wmi: Use struct dev_pm_ops for power management
intel_ips: Remove empty legacy PM callbacks
thinkpad_acpi: Use struct dev_pm_ops instead of legacy PM routines
thinkpad_acpi: Drop pm_message_t arguments from suspend routines
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/omap-rng.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index 1412565c01af..d706bd0e9e80 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c @@ -162,22 +162,24 @@ static int __exit omap_rng_remove(struct platform_device *pdev) #ifdef CONFIG_PM -static int omap_rng_suspend(struct platform_device *pdev, pm_message_t message) +static int omap_rng_suspend(struct device *dev) { omap_rng_write_reg(RNG_MASK_REG, 0x0); return 0; } -static int omap_rng_resume(struct platform_device *pdev) +static int omap_rng_resume(struct device *dev) { omap_rng_write_reg(RNG_MASK_REG, 0x1); return 0; } +static SIMPLE_DEV_PM_OPS(omap_rng_pm, omap_rng_suspend, omap_rng_resume); +#define OMAP_RNG_PM (&omap_rng_pm) + #else -#define omap_rng_suspend NULL -#define omap_rng_resume NULL +#define OMAP_RNG_PM NULL #endif @@ -188,11 +190,10 @@ static struct platform_driver omap_rng_driver = { .driver = { .name = "omap_rng", .owner = THIS_MODULE, + .pm = OMAP_RNG_PM, }, .probe = omap_rng_probe, .remove = __exit_p(omap_rng_remove), - .suspend = omap_rng_suspend, - .resume = omap_rng_resume }; static int __init omap_rng_init(void) |