diff options
author | Joe Perches <joe@perches.com> | 2010-10-20 02:51:54 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-01-08 13:55:32 -0500 |
commit | abdc6fd189405a83ebd20aa9facfbdf3c179d48a (patch) | |
tree | fd58567d51a86e992a7a453a404a43a72c6dc95d /drivers/hwmon | |
parent | 9d72be0da16da10e27f6a8c01f877db6c513413d (diff) |
hwmon: (w83627ehf) 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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/w83627ehf.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 072c58008a63..073eabedc432 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c | |||
@@ -42,6 +42,8 @@ | |||
42 | w83667hg-b 9 5 3 3 0xb350 0xc1 0x5ca3 | 42 | w83667hg-b 9 5 3 3 0xb350 0xc1 0x5ca3 |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
46 | |||
45 | #include <linux/module.h> | 47 | #include <linux/module.h> |
46 | #include <linux/init.h> | 48 | #include <linux/init.h> |
47 | #include <linux/slab.h> | 49 | #include <linux/slab.h> |
@@ -1668,8 +1670,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr, | |||
1668 | break; | 1670 | break; |
1669 | default: | 1671 | default: |
1670 | if (val != 0xffff) | 1672 | if (val != 0xffff) |
1671 | pr_debug(DRVNAME ": unsupported chip ID: 0x%04x\n", | 1673 | pr_debug("unsupported chip ID: 0x%04x\n", val); |
1672 | val); | ||
1673 | superio_exit(sioaddr); | 1674 | superio_exit(sioaddr); |
1674 | return -ENODEV; | 1675 | return -ENODEV; |
1675 | } | 1676 | } |
@@ -1680,8 +1681,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr, | |||
1680 | | superio_inb(sioaddr, SIO_REG_ADDR + 1); | 1681 | | superio_inb(sioaddr, SIO_REG_ADDR + 1); |
1681 | *addr = val & IOREGION_ALIGNMENT; | 1682 | *addr = val & IOREGION_ALIGNMENT; |
1682 | if (*addr == 0) { | 1683 | if (*addr == 0) { |
1683 | printk(KERN_ERR DRVNAME ": Refusing to enable a Super-I/O " | 1684 | pr_err("Refusing to enable a Super-I/O device with a base I/O port 0\n"); |
1684 | "device with a base I/O port 0.\n"); | ||
1685 | superio_exit(sioaddr); | 1685 | superio_exit(sioaddr); |
1686 | return -ENODEV; | 1686 | return -ENODEV; |
1687 | } | 1687 | } |
@@ -1689,13 +1689,12 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr, | |||
1689 | /* Activate logical device if needed */ | 1689 | /* Activate logical device if needed */ |
1690 | val = superio_inb(sioaddr, SIO_REG_ENABLE); | 1690 | val = superio_inb(sioaddr, SIO_REG_ENABLE); |
1691 | if (!(val & 0x01)) { | 1691 | if (!(val & 0x01)) { |
1692 | printk(KERN_WARNING DRVNAME ": Forcibly enabling Super-I/O. " | 1692 | pr_warn("Forcibly enabling Super-I/O. Sensor is probably unusable.\n"); |
1693 | "Sensor is probably unusable.\n"); | ||
1694 | superio_outb(sioaddr, SIO_REG_ENABLE, val | 0x01); | 1693 | superio_outb(sioaddr, SIO_REG_ENABLE, val | 0x01); |
1695 | } | 1694 | } |
1696 | 1695 | ||
1697 | superio_exit(sioaddr); | 1696 | superio_exit(sioaddr); |
1698 | pr_info(DRVNAME ": Found %s chip at %#x\n", sio_name, *addr); | 1697 | pr_info("Found %s chip at %#x\n", sio_name, *addr); |
1699 | sio_data->sioreg = sioaddr; | 1698 | sio_data->sioreg = sioaddr; |
1700 | 1699 | ||
1701 | return 0; | 1700 | return 0; |
@@ -1729,14 +1728,14 @@ static int __init sensors_w83627ehf_init(void) | |||
1729 | 1728 | ||
1730 | if (!(pdev = platform_device_alloc(DRVNAME, address))) { | 1729 | if (!(pdev = platform_device_alloc(DRVNAME, address))) { |
1731 | err = -ENOMEM; | 1730 | err = -ENOMEM; |
1732 | printk(KERN_ERR DRVNAME ": Device allocation failed\n"); | 1731 | pr_err("Device allocation failed\n"); |
1733 | goto exit_unregister; | 1732 | goto exit_unregister; |
1734 | } | 1733 | } |
1735 | 1734 | ||
1736 | err = platform_device_add_data(pdev, &sio_data, | 1735 | err = platform_device_add_data(pdev, &sio_data, |
1737 | sizeof(struct w83627ehf_sio_data)); | 1736 | sizeof(struct w83627ehf_sio_data)); |
1738 | if (err) { | 1737 | if (err) { |
1739 | printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); | 1738 | pr_err("Platform data allocation failed\n"); |
1740 | goto exit_device_put; | 1739 | goto exit_device_put; |
1741 | } | 1740 | } |
1742 | 1741 | ||
@@ -1752,16 +1751,14 @@ static int __init sensors_w83627ehf_init(void) | |||
1752 | 1751 | ||
1753 | err = platform_device_add_resources(pdev, &res, 1); | 1752 | err = platform_device_add_resources(pdev, &res, 1); |
1754 | if (err) { | 1753 | if (err) { |
1755 | printk(KERN_ERR DRVNAME ": Device resource addition failed " | 1754 | pr_err("Device resource addition failed (%d)\n", err); |
1756 | "(%d)\n", err); | ||
1757 | goto exit_device_put; | 1755 | goto exit_device_put; |
1758 | } | 1756 | } |
1759 | 1757 | ||
1760 | /* platform_device_add calls probe() */ | 1758 | /* platform_device_add calls probe() */ |
1761 | err = platform_device_add(pdev); | 1759 | err = platform_device_add(pdev); |
1762 | if (err) { | 1760 | if (err) { |
1763 | printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", | 1761 | pr_err("Device addition failed (%d)\n", err); |
1764 | err); | ||
1765 | goto exit_device_put; | 1762 | goto exit_device_put; |
1766 | } | 1763 | } |
1767 | 1764 | ||