diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-05-23 06:44:38 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2013-07-11 14:57:25 -0400 |
commit | b94828ffb2261a9803948ccd74f2b75105b1bf87 (patch) | |
tree | 7b91ad23f2015b55453a14947da15f0f76c68648 /drivers/watchdog/riowd.c | |
parent | a508e2e634f9ea462c3beb56e12aa50ba9e8b0a9 (diff) |
watchdog: riowd: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/riowd.c')
-rw-r--r-- | drivers/watchdog/riowd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c index 13363adc364f..3dd8ed28adc8 100644 --- a/drivers/watchdog/riowd.c +++ b/drivers/watchdog/riowd.c | |||
@@ -206,7 +206,7 @@ static int riowd_probe(struct platform_device *op) | |||
206 | pr_info("Hardware watchdog [%i minutes], regs at %p\n", | 206 | pr_info("Hardware watchdog [%i minutes], regs at %p\n", |
207 | riowd_timeout, p->regs); | 207 | riowd_timeout, p->regs); |
208 | 208 | ||
209 | dev_set_drvdata(&op->dev, p); | 209 | platform_set_drvdata(op, p); |
210 | return 0; | 210 | return 0; |
211 | 211 | ||
212 | out_iounmap: | 212 | out_iounmap: |
@@ -219,7 +219,7 @@ out: | |||
219 | 219 | ||
220 | static int riowd_remove(struct platform_device *op) | 220 | static int riowd_remove(struct platform_device *op) |
221 | { | 221 | { |
222 | struct riowd *p = dev_get_drvdata(&op->dev); | 222 | struct riowd *p = platform_get_drvdata(op); |
223 | 223 | ||
224 | misc_deregister(&riowd_miscdev); | 224 | misc_deregister(&riowd_miscdev); |
225 | of_iounmap(&op->resource[0], p->regs, 2); | 225 | of_iounmap(&op->resource[0], p->regs, 2); |