watchdog: mpc8xxx: use better error code when watchdog cannot be enabled

checkpatch warns about ENOSYS, telling "ENOSYS means 'invalid syscall
nr' and nothing else". So use ENODEV instead.

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>
This commit is contained in:
Uwe Kleine-König 2015-08-12 10:15:57 +02:00 committed by Wim Van Sebroeck
parent 7997ebad4d
commit 72cd501e6a

View File

@ -170,7 +170,7 @@ static int mpc8xxx_wdt_probe(struct platform_device *ofdev)
enabled = in_be32(&ddata->base->swcrr) & SWCRR_SWEN;
if (!enabled && wdt_type->hw_enabled) {
pr_info("could not be enabled in software\n");
return -ENOSYS;
return -ENODEV;
}
spin_lock_init(&ddata->lock);