diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-19 09:23:28 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-19 09:23:28 -0300 |
commit | d5aeee8cb28317ef608ecac421abc4d986d585d2 (patch) | |
tree | 70ec8ed8891f26e5c58152ffca9924ea1c58fe3a /drivers/watchdog/ar7_wdt.c | |
parent | 32898a145404acbebe3256709e012c2830a2043b (diff) | |
parent | e816b57a337ea3b755de72bec38c10c864f23015 (diff) | |
download | blackbird-op-linux-d5aeee8cb28317ef608ecac421abc4d986d585d2.tar.gz blackbird-op-linux-d5aeee8cb28317ef608ecac421abc4d986d585d2.zip |
Merge tag 'v3.4-rc3' into staging/for_v3.5
* tag 'v3.4-rc3': (3755 commits)
Linux 3.4-rc3
x86-32: fix up strncpy_from_user() sign error
ARM: 7386/1: jump_label: fixup for rename to static_key
ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE
ARM: 7382/1: mm: truncate memory banks to fit in 4GB space for classic MMU
ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus
PCI: Fix regression in pci_restore_state(), v3
SCSI: Fix error handling when no ULD is attached
ARM: OMAP: clock: cleanup CPUfreq leftovers, fix build errors
ARM: dts: remove blank interrupt-parent properties
ARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine files
do not export kernel's NULL #define to userspace
ARM: EXYNOS: Remove broken config values for touchscren for NURI board
ARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boards
ARM: EXYNOS: fix regulator name for NURI board
ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL
cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUS
sparc64: Eliminate obsolete __handle_softirq() function
sparc64: Fix bootup crash on sun4v.
ARM: msm: Fix section mismatches in proc_comm.c
...
Diffstat (limited to 'drivers/watchdog/ar7_wdt.c')
-rw-r--r-- | drivers/watchdog/ar7_wdt.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c index 502773ad5acd..639ae9a23fbc 100644 --- a/drivers/watchdog/ar7_wdt.c +++ b/drivers/watchdog/ar7_wdt.c @@ -23,6 +23,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/errno.h> @@ -39,7 +41,6 @@ #include <asm/addrspace.h> #include <asm/mach-ar7/ar7.h> -#define DRVNAME "ar7_wdt" #define LONGNAME "TI AR7 Watchdog Timer" MODULE_AUTHOR("Nicolas Thill <nico@openwrt.org>"); @@ -51,8 +52,8 @@ static int margin = 60; module_param(margin, int, 0); MODULE_PARM_DESC(margin, "Watchdog margin in seconds"); -static int nowayout = WATCHDOG_NOWAYOUT; -module_param(nowayout, int, 0); +static bool nowayout = WATCHDOG_NOWAYOUT; +module_param(nowayout, bool, 0); MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close"); #define READ_REG(x) readl((void __iomem *)&(x)) @@ -93,7 +94,7 @@ static void ar7_wdt_kick(u32 value) return; } } - printk(KERN_ERR DRVNAME ": failed to unlock WDT kick reg\n"); + pr_err("failed to unlock WDT kick reg\n"); } static void ar7_wdt_prescale(u32 value) @@ -106,7 +107,7 @@ static void ar7_wdt_prescale(u32 value) return; } } - printk(KERN_ERR DRVNAME ": failed to unlock WDT prescale reg\n"); + pr_err("failed to unlock WDT prescale reg\n"); } static void ar7_wdt_change(u32 value) @@ -119,7 +120,7 @@ static void ar7_wdt_change(u32 value) return; } } - printk(KERN_ERR DRVNAME ": failed to unlock WDT change reg\n"); + pr_err("failed to unlock WDT change reg\n"); } static void ar7_wdt_disable(u32 value) @@ -135,7 +136,7 @@ static void ar7_wdt_disable(u32 value) } } } - printk(KERN_ERR DRVNAME ": failed to unlock WDT disable reg\n"); + pr_err("failed to unlock WDT disable reg\n"); } static void ar7_wdt_update_margin(int new_margin) @@ -151,21 +152,20 @@ static void ar7_wdt_update_margin(int new_margin) change = 0xffff; ar7_wdt_change(change); margin = change * prescale_value / vbus_rate; - printk(KERN_INFO DRVNAME - ": timer margin %d seconds (prescale %d, change %d, freq %d)\n", - margin, prescale_value, change, vbus_rate); + pr_info("timer margin %d seconds (prescale %d, change %d, freq %d)\n", + margin, prescale_value, change, vbus_rate); } static void ar7_wdt_enable_wdt(void) { - printk(KERN_DEBUG DRVNAME ": enabling watchdog timer\n"); + pr_debug("enabling watchdog timer\n"); ar7_wdt_disable(1); ar7_wdt_kick(1); } static void ar7_wdt_disable_wdt(void) { - printk(KERN_DEBUG DRVNAME ": disabling watchdog timer\n"); + pr_debug("disabling watchdog timer\n"); ar7_wdt_disable(0); } @@ -183,9 +183,7 @@ static int ar7_wdt_open(struct inode *inode, struct file *file) static int ar7_wdt_release(struct inode *inode, struct file *file) { if (!expect_close) - printk(KERN_WARNING DRVNAME - ": watchdog device closed unexpectedly," - "will not disable the watchdog timer\n"); + pr_warn("watchdog device closed unexpectedly, will not disable the watchdog timer\n"); else if (!nowayout) ar7_wdt_disable_wdt(); clear_bit(0, &wdt_is_open); @@ -283,28 +281,28 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev) ar7_regs_wdt = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); if (!ar7_regs_wdt) { - printk(KERN_ERR DRVNAME ": could not get registers resource\n"); + pr_err("could not get registers resource\n"); rc = -ENODEV; goto out; } if (!request_mem_region(ar7_regs_wdt->start, resource_size(ar7_regs_wdt), LONGNAME)) { - printk(KERN_WARNING DRVNAME ": watchdog I/O region busy\n"); + pr_warn("watchdog I/O region busy\n"); rc = -EBUSY; goto out; } ar7_wdt = ioremap(ar7_regs_wdt->start, resource_size(ar7_regs_wdt)); if (!ar7_wdt) { - printk(KERN_ERR DRVNAME ": could not ioremap registers\n"); + pr_err("could not ioremap registers\n"); rc = -ENXIO; goto out_mem_region; } vbus_clk = clk_get(NULL, "vbus"); if (IS_ERR(vbus_clk)) { - printk(KERN_ERR DRVNAME ": could not get vbus clock\n"); + pr_err("could not get vbus clock\n"); rc = PTR_ERR(vbus_clk); goto out_mem_region; } @@ -315,7 +313,7 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev) rc = misc_register(&ar7_wdt_miscdev); if (rc) { - printk(KERN_ERR DRVNAME ": unable to register misc device\n"); + pr_err("unable to register misc device\n"); goto out_alloc; } goto out; |