Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jingoo Han and committed by
Wim Van Sebroeck
b94828ff a508e2e6

+2 -2
+2 -2
drivers/watchdog/riowd.c
··· 206 206 pr_info("Hardware watchdog [%i minutes], regs at %p\n", 207 207 riowd_timeout, p->regs); 208 208 209 - dev_set_drvdata(&op->dev, p); 209 + platform_set_drvdata(op, p); 210 210 return 0; 211 211 212 212 out_iounmap: ··· 219 219 220 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 224 misc_deregister(&riowd_miscdev); 225 225 of_iounmap(&op->resource[0], p->regs, 2);