projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
watchdog
/
sbc8360.c
diff --git
a/drivers/watchdog/sbc8360.c
b/drivers/watchdog/sbc8360.c
index 514ec23050f7814565a209649c809f0763426151..d4781e05f0171bbe577f95d524445362db59624a 100644
(file)
--- a/
drivers/watchdog/sbc8360.c
+++ b/
drivers/watchdog/sbc8360.c
@@
-36,6
+36,8
@@
*
*/
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/types.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/miscdevice.h>
@@
-51,13
+53,10
@@
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/uaccess.h>
-#include <asm/system.h>
static unsigned long sbc8360_is_open;
static char expect_close;
static unsigned long sbc8360_is_open;
static char expect_close;
-#define PFX "sbc8360: "
-
/*
*
* Watchdog Timer Configuration
/*
*
* Watchdog Timer Configuration
@@
-197,11
+196,11
@@
static int wd_times[64][2] = {
static int timeout = 27;
static int wd_margin = 0xB;
static int wd_multiplier = 2;
static int timeout = 27;
static int wd_margin = 0xB;
static int wd_multiplier = 2;
-static
int
nowayout = WATCHDOG_NOWAYOUT;
+static
bool
nowayout = WATCHDOG_NOWAYOUT;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))");
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))");
-module_param(nowayout,
int
, 0);
+module_param(nowayout,
bool
, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
@@
-280,8
+279,7
@@
static int sbc8360_close(struct inode *inode, struct file *file)
if (expect_close == 42)
sbc8360_stop();
else
if (expect_close == 42)
sbc8360_stop();
else
- printk(KERN_CRIT PFX "SBC8360 device closed unexpectedly. "
- "SBC8360 will not stop!\n");
+ pr_crit("SBC8360 device closed unexpectedly. SBC8360 will not stop!\n");
clear_bit(0, &sbc8360_is_open);
expect_close = 0;
clear_bit(0, &sbc8360_is_open);
expect_close = 0;
@@
-334,20
+332,19
@@
static int __init sbc8360_init(void)
unsigned long int mseconds = 60000;
if (timeout < 0 || timeout > 63) {
unsigned long int mseconds = 60000;
if (timeout < 0 || timeout > 63) {
- pr
intk(KERN_ERR PFX "Invalid timeout index (must be 0-63).
\n");
+ pr
_err("Invalid timeout index (must be 0-63)
\n");
res = -EINVAL;
goto out;
}
if (!request_region(SBC8360_ENABLE, 1, "SBC8360")) {
res = -EINVAL;
goto out;
}
if (!request_region(SBC8360_ENABLE, 1, "SBC8360")) {
- pr
intk(KERN_ERR PFX "ENABLE method I/O %X is not available.
\n",
+ pr
_err("ENABLE method I/O %X is not available
\n",
SBC8360_ENABLE);
res = -EIO;
goto out;
}
if (!request_region(SBC8360_BASETIME, 1, "SBC8360")) {
SBC8360_ENABLE);
res = -EIO;
goto out;
}
if (!request_region(SBC8360_BASETIME, 1, "SBC8360")) {
- printk(KERN_ERR PFX
- "BASETIME method I/O %X is not available.\n",
+ pr_err("BASETIME method I/O %X is not available\n",
SBC8360_BASETIME);
res = -EIO;
goto out_nobasetimereg;
SBC8360_BASETIME);
res = -EIO;
goto out_nobasetimereg;
@@
-355,13
+352,13
@@
static int __init sbc8360_init(void)
res = register_reboot_notifier(&sbc8360_notifier);
if (res) {
res = register_reboot_notifier(&sbc8360_notifier);
if (res) {
- pr
intk(KERN_ERR PFX "Failed to register reboot notifier.
\n");
+ pr
_err("Failed to register reboot notifier
\n");
goto out_noreboot;
}
res = misc_register(&sbc8360_miscdev);
if (res) {
goto out_noreboot;
}
res = misc_register(&sbc8360_miscdev);
if (res) {
- pr
intk(KERN_ERR PFX
"failed to register misc device\n");
+ pr
_err(
"failed to register misc device\n");
goto out_nomisc;
}
goto out_nomisc;
}
@@
-378,7
+375,7
@@
static int __init sbc8360_init(void)
mseconds = (wd_margin + 1) * 100000;
/* My kingdom for the ability to print "0.5 seconds" in the kernel! */
mseconds = (wd_margin + 1) * 100000;
/* My kingdom for the ability to print "0.5 seconds" in the kernel! */
- pr
intk(KERN_INFO PFX "Timeout set at %ld ms.
\n", mseconds);
+ pr
_info("Timeout set at %ld ms
\n", mseconds);
return 0;
return 0;