aboutsummaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorFabio Estevam2015-10-02 00:25:28 -0300
committerWim Van Sebroeck2015-10-28 22:57:17 +0100
commit9493c0d824f7012dab7034a5b527ac8f07db5bed (patch)
treefc34bb78dca72400e65985b77689bacba580588e /drivers/watchdog
parent9dd4e173f71d5ac6ea37f7dbf49af6e5cd44f9fb (diff)
watchdog: imx2_wdt: Use register definition in regmap_write()
In order to improve readability it is better to pass the register name definition rather than to pass its hardcoded offset. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/imx2_wdt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 0bb1a1d1b170..29ef719a6a3c 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -91,7 +91,7 @@ static int imx2_restart_handler(struct notifier_block *this, unsigned long mode,
struct imx2_wdt_device,
restart_handler);
/* Assert SRS signal */
- regmap_write(wdev->regmap, 0, wcr_enable);
+ regmap_write(wdev->regmap, IMX2_WDT_WCR, wcr_enable);
/*
* Due to imx6q errata ERR004346 (WDOG: WDOG SRS bit requires to be
* written twice), we add another two writes to ensure there must be at
@@ -99,8 +99,8 @@ static int imx2_restart_handler(struct notifier_block *this, unsigned long mode,
* the target check here, since the writes shouldn't be a huge burden
* for other platforms.
*/
- regmap_write(wdev->regmap, 0, wcr_enable);
- regmap_write(wdev->regmap, 0, wcr_enable);
+ regmap_write(wdev->regmap, IMX2_WDT_WCR, wcr_enable);
+ regmap_write(wdev->regmap, IMX2_WDT_WCR, wcr_enable);
/* wait for reset to assert... */
mdelay(500);