Skip to content

Commit

Permalink
watchdog: mpc8xxx: remove dead code
Browse files Browse the repository at this point in the history
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Uwe Kleine-König authored and Wim Van Sebroeck committed Sep 9, 2015
1 parent 6cd8a1b commit a57e06f
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions drivers/watchdog/mpc8xxx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");

/*
* We always prescale, but if someone really doesn't want to they can set this
* to 0
*/
static int prescale = 1;

static DEFINE_SPINLOCK(wdt_spinlock);

static void mpc8xxx_wdt_keepalive(void)
Expand Down Expand Up @@ -101,11 +95,9 @@ static void mpc8xxx_wdt_timer_ping(unsigned long arg)

static int mpc8xxx_wdt_start(struct watchdog_device *w)
{
u32 tmp = SWCRR_SWEN;
u32 tmp = SWCRR_SWEN | SWCRR_SWPR;

/* Good, fire up the show */
if (prescale)
tmp |= SWCRR_SWPR;
if (reset)
tmp |= SWCRR_SWRI;

Expand Down Expand Up @@ -179,10 +171,7 @@ static int mpc8xxx_wdt_probe(struct platform_device *ofdev)
}

/* Calculate the timeout in seconds */
if (prescale)
timeout_sec = (timeout * wdt_type->prescaler) / freq;
else
timeout_sec = timeout / freq;
timeout_sec = (timeout * wdt_type->prescaler) / freq;

mpc8xxx_wdt_dev.timeout = timeout_sec;
#ifdef MODULE
Expand Down

0 comments on commit a57e06f

Please sign in to comment.