Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: shwdt: Use setup_timer()

The function setup_timer combines the initialization of a timer with
the initialization of the timer's function and data fields.
The multiline code for timer initialization is now replaced
with function setup_timer.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by

Muhammad Falak R Wani and committed by
Wim Van Sebroeck
12fe36e2 d904ac34

+1 -3
+1 -3
drivers/watchdog/shwdt.c
··· 275 275 return rc; 276 276 } 277 277 278 - init_timer(&wdt->timer); 279 - wdt->timer.function = sh_wdt_ping; 280 - wdt->timer.data = (unsigned long)wdt; 278 + setup_timer(&wdt->timer, sh_wdt_ping, (unsigned long)wdt); 281 279 wdt->timer.expires = next_ping_period(clock_division_ratio); 282 280 283 281 dev_info(&pdev->dev, "initialized.\n");