hwmon: (dme1737) 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:
committed by
Guenter Roeck
parent
f8bb892568
commit
9c6e13b411
@@ -25,6 +25,8 @@
|
|||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#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>
|
||||||
@@ -2446,7 +2448,7 @@ static int __init dme1737_isa_detect(int sio_cip, unsigned short *addr)
|
|||||||
/* Get the base address of the runtime registers */
|
/* Get the base address of the runtime registers */
|
||||||
if (!(base_addr = (dme1737_sio_inb(sio_cip, 0x60) << 8) |
|
if (!(base_addr = (dme1737_sio_inb(sio_cip, 0x60) << 8) |
|
||||||
dme1737_sio_inb(sio_cip, 0x61))) {
|
dme1737_sio_inb(sio_cip, 0x61))) {
|
||||||
printk(KERN_ERR "dme1737: Base address not set.\n");
|
pr_err("Base address not set\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@@ -2475,20 +2477,18 @@ static int __init dme1737_isa_device_add(unsigned short addr)
|
|||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
if (!(pdev = platform_device_alloc("dme1737", addr))) {
|
if (!(pdev = platform_device_alloc("dme1737", addr))) {
|
||||||
printk(KERN_ERR "dme1737: Failed to allocate device.\n");
|
pr_err("Failed to allocate device\n");
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((err = platform_device_add_resources(pdev, &res, 1))) {
|
if ((err = platform_device_add_resources(pdev, &res, 1))) {
|
||||||
printk(KERN_ERR "dme1737: Failed to add device resource "
|
pr_err("Failed to add device resource (err = %d)\n", err);
|
||||||
"(err = %d).\n", err);
|
|
||||||
goto exit_device_put;
|
goto exit_device_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((err = platform_device_add(pdev))) {
|
if ((err = platform_device_add(pdev))) {
|
||||||
printk(KERN_ERR "dme1737: Failed to add device (err = %d).\n",
|
pr_err("Failed to add device (err = %d)\n", err);
|
||||||
err);
|
|
||||||
goto exit_device_put;
|
goto exit_device_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user