Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62e21f5d authored by Geliang Tang's avatar Geliang Tang Committed by Wim Van Sebroeck
Browse files

watchdog: cadence_wdt: use to_platform_device()



Use to_platform_device() instead of open-coding it.

Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 8605fec1
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -421,8 +421,7 @@ static void cdns_wdt_shutdown(struct platform_device *pdev)
 */
static int __maybe_unused cdns_wdt_suspend(struct device *dev)
{
	struct platform_device *pdev = container_of(dev,
			struct platform_device, dev);
	struct platform_device *pdev = to_platform_device(dev);
	struct cdns_wdt *wdt = platform_get_drvdata(pdev);

	cdns_wdt_stop(&wdt->cdns_wdt_device);
@@ -440,8 +439,7 @@ static int __maybe_unused cdns_wdt_suspend(struct device *dev)
static int __maybe_unused cdns_wdt_resume(struct device *dev)
{
	int ret;
	struct platform_device *pdev = container_of(dev,
			struct platform_device, dev);
	struct platform_device *pdev = to_platform_device(dev);
	struct cdns_wdt *wdt = platform_get_drvdata(pdev);

	ret = clk_prepare_enable(wdt->clk);