From: Joe Perches Date: Wed, 20 Oct 2010 06:51:33 +0000 (+0000) Subject: hwmon: (f71805f) Use pr_fmt and pr_ X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e54c5ad61f4e2c4fdfbdb8dff31fc604073d3550;p=linux-beck.git hwmon: (f71805f) Use pr_fmt and pr_ Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_ Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c index 525a00bd70b1..92f949767ece 100644 --- a/drivers/hwmon/f71805f.c +++ b/drivers/hwmon/f71805f.c @@ -28,6 +28,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -1309,7 +1311,7 @@ static int __devinit f71805f_probe(struct platform_device *pdev) if (!(data = kzalloc(sizeof(struct f71805f_data), GFP_KERNEL))) { err = -ENOMEM; - printk(KERN_ERR DRVNAME ": Out of memory\n"); + pr_err("Out of memory\n"); goto exit; } @@ -1451,7 +1453,7 @@ static int __init f71805f_device_add(unsigned short address, pdev = platform_device_alloc(DRVNAME, address); if (!pdev) { err = -ENOMEM; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); + pr_err("Device allocation failed\n"); goto exit; } @@ -1462,22 +1464,20 @@ static int __init f71805f_device_add(unsigned short address, err = platform_device_add_resources(pdev, &res, 1); if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); + pr_err("Device resource addition failed (%d)\n", err); goto exit_device_put; } err = platform_device_add_data(pdev, sio_data, sizeof(struct f71805f_sio_data)); if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); + pr_err("Platform data allocation failed\n"); goto exit_device_put; } err = platform_device_add(pdev); if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); + pr_err("Device addition failed (%d)\n", err); goto exit_device_put; } @@ -1516,30 +1516,27 @@ static int __init f71805f_find(int sioaddr, unsigned short *address, sio_data->fnsel1 = superio_inb(sioaddr, SIO_REG_FNSEL1); break; default: - printk(KERN_INFO DRVNAME ": Unsupported Fintek device, " - "skipping\n"); + pr_info("Unsupported Fintek device, skipping\n"); goto exit; } superio_select(sioaddr, F71805F_LD_HWM); if (!(superio_inb(sioaddr, SIO_REG_ENABLE) & 0x01)) { - printk(KERN_WARNING DRVNAME ": Device not activated, " - "skipping\n"); + pr_warn("Device not activated, skipping\n"); goto exit; } *address = superio_inw(sioaddr, SIO_REG_ADDR); if (*address == 0) { - printk(KERN_WARNING DRVNAME ": Base address not set, " - "skipping\n"); + pr_warn("Base address not set, skipping\n"); goto exit; } *address &= ~(REGION_LENGTH - 1); /* Ignore 3 LSB */ err = 0; - printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %u\n", - names[sio_data->kind], *address, - superio_inb(sioaddr, SIO_REG_DEVREV)); + pr_info("Found %s chip at %#x, revision %u\n", + names[sio_data->kind], *address, + superio_inb(sioaddr, SIO_REG_DEVREV)); exit: superio_exit(sioaddr);