summaryrefslogtreecommitdiff
path: root/target/linux/atheros/patches-3.10/130-watchdog.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-06-10 09:05:55 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-06-10 09:05:55 +0000
commit90ca9a582dcbdc6dd4f8f7f6ab015c0fe99ce1e8 (patch)
tree9221af3276e32c425b3b2103c075060c96ed61da /target/linux/atheros/patches-3.10/130-watchdog.patch
parent15a2ebbc38bc7e7a5fd3920962aab2de58ca8461 (diff)
downloadmtk-20170518-90ca9a582dcbdc6dd4f8f7f6ab015c0fe99ce1e8.zip
mtk-20170518-90ca9a582dcbdc6dd4f8f7f6ab015c0fe99ce1e8.tar.gz
mtk-20170518-90ca9a582dcbdc6dd4f8f7f6ab015c0fe99ce1e8.tar.bz2
atheros: various printk(...) fixes
Use more particular functions dev_<level> or pr_<level>(...) insead of direct printk(...) call. Add KERN_LEVEL to calls what missed it. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> SVN-Revision: 41088
Diffstat (limited to 'target/linux/atheros/patches-3.10/130-watchdog.patch')
-rw-r--r--target/linux/atheros/patches-3.10/130-watchdog.patch17
1 files changed, 10 insertions, 7 deletions
diff --git a/target/linux/atheros/patches-3.10/130-watchdog.patch b/target/linux/atheros/patches-3.10/130-watchdog.patch
index 97b79b9..7cc8fee 100644
--- a/target/linux/atheros/patches-3.10/130-watchdog.patch
+++ b/target/linux/atheros/patches-3.10/130-watchdog.patch
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/drivers/watchdog/ar2315-wtd.c
-@@ -0,0 +1,197 @@
+@@ -0,0 +1,200 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
@@ -80,10 +80,12 @@
+}
+
+static irqreturn_t
-+ar2315_wdt_interrupt(int irq, void *dev_id)
++ar2315_wdt_interrupt(int irq, void *dev)
+{
++ struct platform_device *pdev = (struct platform_device *)dev;
++
+ if (started) {
-+ printk(KERN_CRIT "watchdog expired, rebooting system\n");
++ dev_crit(&pdev->dev, "watchdog expired, rebooting system\n");
+ emergency_restart();
+ } else {
+ ar231x_write_reg(AR2315_WDC, 0);
@@ -150,15 +152,16 @@
+ int ret = 0;
+
+ ar2315_wdt_enable();
-+ ret = request_irq(AR531X_MISC_IRQ_WATCHDOG, ar2315_wdt_interrupt, IRQF_DISABLED, "ar2315_wdt", NULL);
++ ret = request_irq(AR531X_MISC_IRQ_WATCHDOG, ar2315_wdt_interrupt,
++ IRQF_DISABLED, "ar2315_wdt", dev);
+ if (ret) {
-+ printk(KERN_ERR "ar2315wdt: failed to register inetrrupt\n");
++ dev_err(&dev->dev, "failed to register inetrrupt\n");
+ goto out;
+ }
+
+ ret = misc_register(&ar2315_wdt_miscdev);
+ if(ret)
-+ printk(KERN_ERR "ar2315wdt: failed to register miscdev\n");
++ dev_err(&dev->dev, "failed to register miscdev\n");
+
+out:
+ return ret;
@@ -186,7 +189,7 @@
+{
+ int ret = platform_driver_register(&ar2315_wdt_driver);
+ if(ret)
-+ printk(KERN_INFO "ar2315_wdt: error registering platfom driver!");
++ pr_err("ar2315_wdt: error registering platfom driver!\n");
+ return ret;
+}
+