Hello Wolfram,
thank you for your feedback!
Subject: Re: [RFC v4 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support
quoted
+#ifdef CONFIG_PM
+static int rwdt_suspend(struct device *dev)
+{
+struct platform_device *pdev;
+struct rwdt_priv *priv;
+
+pdev = to_platform_device(dev);
+priv = platform_get_drvdata(pdev);
struct rwdt_priv *priv = dev_get_drvdata(dev);
?
will change
quoted
+if (watchdog_active(&priv->wdev)) {
+rwdt_write(priv, priv->cks, RWTCSRA);
+}
+return 0;
+}
+
+static int rwdt_resume(struct device *dev)
+{
+struct platform_device *pdev;
+struct rwdt_priv *priv;
+
+pdev = to_platform_device(dev);
+priv = platform_get_drvdata(pdev);
ditto
will change
quoted
+if (watchdog_active(&priv->wdev)) {
+rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
+}
+return 0;
+}
+
+static const struct dev_pm_ops rwdt_pm = {
+.suspend = rwdt_suspend,
+.resume = rwdt_resume,
+};
Use SIMPLE_DEV_PM_OPS macro (see stmp3xxx_rtc_wdt.c for an example) for
more compact code and...
quoted
+#ifdef CONFIG_PM
+.pm = &rwdt_pm,
+#endif
... removing this ifdeffery?
will take out the ifdeffery
Thanks,
Fabrizio
Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html