Commit 4c7fbbc4a57a35ed109f58f52eff1a04660789e9
Committed by
Wim Van Sebroeck
1 parent
9066317178
watchdog: xilinx: Fix all printk messages
Use dev_ functions for printk messages. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Showing 1 changed file with 8 additions and 8 deletions Side-by-side Diff
drivers/watchdog/of_xilinx_wdt.c
... | ... | @@ -10,8 +10,6 @@ |
10 | 10 | * 2 of the License, or (at your option) any later version. |
11 | 11 | */ |
12 | 12 | |
13 | -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | |
14 | - | |
15 | 13 | #include <linux/err.h> |
16 | 14 | #include <linux/module.h> |
17 | 15 | #include <linux/types.h> |
... | ... | @@ -41,7 +39,6 @@ |
41 | 39 | #define XWT_TIMER_FAILED 0xFFFFFFFF |
42 | 40 | |
43 | 41 | #define WATCHDOG_NAME "Xilinx Watchdog" |
44 | -#define PFX WATCHDOG_NAME ": " | |
45 | 42 | |
46 | 43 | struct xwdt_device { |
47 | 44 | void __iomem *base; |
48 | 45 | |
... | ... | @@ -174,14 +171,16 @@ |
174 | 171 | "clock-frequency", NULL); |
175 | 172 | |
176 | 173 | if (pfreq == NULL) { |
177 | - pr_warn("The watchdog clock frequency cannot be obtained!\n"); | |
174 | + dev_warn(&pdev->dev, | |
175 | + "The watchdog clock frequency cannot be obtained\n"); | |
178 | 176 | no_timeout = true; |
179 | 177 | } |
180 | 178 | |
181 | 179 | tmptr = (u32 *)of_get_property(pdev->dev.of_node, |
182 | 180 | "xlnx,wdt-interval", NULL); |
183 | 181 | if (tmptr == NULL) { |
184 | - pr_warn("Parameter \"xlnx,wdt-interval\" not found in device tree!\n"); | |
182 | + dev_warn(&pdev->dev, | |
183 | + "Parameter \"xlnx,wdt-interval\" not found\n"); | |
185 | 184 | no_timeout = true; |
186 | 185 | } else { |
187 | 186 | xdev->wdt_interval = *tmptr; |
... | ... | @@ -190,7 +189,8 @@ |
190 | 189 | tmptr = (u32 *)of_get_property(pdev->dev.of_node, |
191 | 190 | "xlnx,wdt-enable-once", NULL); |
192 | 191 | if (tmptr == NULL) { |
193 | - pr_warn("Parameter \"xlnx,wdt-enable-once\" not found in device tree!\n"); | |
192 | + dev_warn(&pdev->dev, | |
193 | + "Parameter \"xlnx,wdt-enable-once\" not found\n"); | |
194 | 194 | watchdog_set_nowayout(xilinx_wdt_wdd, true); |
195 | 195 | } |
196 | 196 | |
197 | 197 | |
... | ... | @@ -207,13 +207,13 @@ |
207 | 207 | |
208 | 208 | rc = xwdt_selftest(xdev); |
209 | 209 | if (rc == XWT_TIMER_FAILED) { |
210 | - pr_err("SelfTest routine error!\n"); | |
210 | + dev_err(&pdev->dev, "SelfTest routine error\n"); | |
211 | 211 | return rc; |
212 | 212 | } |
213 | 213 | |
214 | 214 | rc = watchdog_register_device(xilinx_wdt_wdd); |
215 | 215 | if (rc) { |
216 | - pr_err("cannot register watchdog (err=%d)\n", rc); | |
216 | + dev_err(&pdev->dev, "Cannot register watchdog (err=%d)\n", rc); | |
217 | 217 | return rc; |
218 | 218 | } |
219 | 219 |