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

Commit 5cf4e69d authored by Michal Simek's avatar Michal Simek Committed by Wim Van Sebroeck
Browse files

watchdog: xilinx: Move control_status_reg to functions



control_status_reg is temp variables and should be
used locally by specific function.

Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent d14fd964
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -51,13 +51,14 @@ struct xwdt_device {
static struct xwdt_device xdev;

static  u32 timeout;
static  u32 control_status_reg;
static  u8  no_timeout;

static  DEFINE_SPINLOCK(spinlock);

static int xilinx_wdt_start(struct watchdog_device *wdd)
{
	u32 control_status_reg;

	spin_lock(&spinlock);

	/* Clean previous status and enable the watchdog timer */
@@ -76,6 +77,8 @@ static int xilinx_wdt_start(struct watchdog_device *wdd)

static int xilinx_wdt_stop(struct watchdog_device *wdd)
{
	u32 control_status_reg;

	spin_lock(&spinlock);

	control_status_reg = ioread32(xdev.base + XWT_TWCSR0_OFFSET);
@@ -93,6 +96,8 @@ static int xilinx_wdt_stop(struct watchdog_device *wdd)

static int xilinx_wdt_keepalive(struct watchdog_device *wdd)
{
	u32 control_status_reg;

	spin_lock(&spinlock);

	control_status_reg = ioread32(xdev.base + XWT_TWCSR0_OFFSET);