mirror of
https://github.com/torvalds/linux.git
synced 2024-10-24 22:20:55 +00:00
hwmon: (w83627hf) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
This commit is contained in:
parent
abdc6fd189
commit
18de030f1d
|
@ -39,6 +39,8 @@
|
||||||
supported yet.
|
supported yet.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
@ -1166,14 +1168,13 @@ static int __init w83627hf_find(int sioaddr, unsigned short *addr,
|
||||||
superio_inb(sio_data, WINB_BASE_REG + 1);
|
superio_inb(sio_data, WINB_BASE_REG + 1);
|
||||||
*addr = val & WINB_ALIGNMENT;
|
*addr = val & WINB_ALIGNMENT;
|
||||||
if (*addr == 0) {
|
if (*addr == 0) {
|
||||||
printk(KERN_WARNING DRVNAME ": Base address not set, "
|
pr_warn("Base address not set, skipping\n");
|
||||||
"skipping\n");
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
val = superio_inb(sio_data, WINB_ACT_REG);
|
val = superio_inb(sio_data, WINB_ACT_REG);
|
||||||
if (!(val & 0x01)) {
|
if (!(val & 0x01)) {
|
||||||
printk(KERN_WARNING DRVNAME ": Enabling HWM logical device\n");
|
pr_warn("Enabling HWM logical device\n");
|
||||||
superio_outb(sio_data, WINB_ACT_REG, val | 0x01);
|
superio_outb(sio_data, WINB_ACT_REG, val | 0x01);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1789,28 +1790,26 @@ static int __init w83627hf_device_add(unsigned short address,
|
||||||
pdev = platform_device_alloc(DRVNAME, address);
|
pdev = platform_device_alloc(DRVNAME, address);
|
||||||
if (!pdev) {
|
if (!pdev) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
printk(KERN_ERR DRVNAME ": Device allocation failed\n");
|
pr_err("Device allocation failed\n");
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = platform_device_add_resources(pdev, &res, 1);
|
err = platform_device_add_resources(pdev, &res, 1);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR DRVNAME ": Device resource addition failed "
|
pr_err("Device resource addition failed (%d)\n", err);
|
||||||
"(%d)\n", err);
|
|
||||||
goto exit_device_put;
|
goto exit_device_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = platform_device_add_data(pdev, sio_data,
|
err = platform_device_add_data(pdev, sio_data,
|
||||||
sizeof(struct w83627hf_sio_data));
|
sizeof(struct w83627hf_sio_data));
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR DRVNAME ": Platform data allocation failed\n");
|
pr_err("Platform data allocation failed\n");
|
||||||
goto exit_device_put;
|
goto exit_device_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = platform_device_add(pdev);
|
err = platform_device_add(pdev);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n",
|
pr_err("Device addition failed (%d)\n", err);
|
||||||
err);
|
|
||||||
goto exit_device_put;
|
goto exit_device_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user