aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/it87.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-01-12 15:55:10 -0500
committerJean Delvare <khali@endymion.delvare>2011-01-12 15:55:10 -0500
commita8ca103793350bd66280d56ee58870c682b54e75 (patch)
tree8bc202ec2beddaabf0794f413f2139912b9beea7 /drivers/hwmon/it87.c
parent632bdb24d717f1b24841b9dc31efb6837afe0c55 (diff)
hwmon: (it87) 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: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/it87.c')
-rw-r--r--drivers/hwmon/it87.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index a428a9264195..316b64823f7b 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -38,6 +38,8 @@
38 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 38 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
39 */ 39 */
40 40
41#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
42
41#include <linux/module.h> 43#include <linux/module.h>
42#include <linux/init.h> 44#include <linux/init.h>
43#include <linux/slab.h> 45#include <linux/slab.h>
@@ -1570,26 +1572,25 @@ static int __init it87_find(unsigned short *address,
1570 case 0xffff: /* No device at all */ 1572 case 0xffff: /* No device at all */
1571 goto exit; 1573 goto exit;
1572 default: 1574 default:
1573 pr_debug(DRVNAME ": Unsupported chip (DEVID=0x%x)\n", 1575 pr_debug("Unsupported chip (DEVID=0x%x)\n", chip_type);
1574 chip_type);
1575 goto exit; 1576 goto exit;
1576 } 1577 }
1577 1578
1578 superio_select(PME); 1579 superio_select(PME);
1579 if (!(superio_inb(IT87_ACT_REG) & 0x01)) { 1580 if (!(superio_inb(IT87_ACT_REG) & 0x01)) {
1580 pr_info("it87: Device not activated, skipping\n"); 1581 pr_info("Device not activated, skipping\n");
1581 goto exit; 1582 goto exit;
1582 } 1583 }
1583 1584
1584 *address = superio_inw(IT87_BASE_REG) & ~(IT87_EXTENT - 1); 1585 *address = superio_inw(IT87_BASE_REG) & ~(IT87_EXTENT - 1);
1585 if (*address == 0) { 1586 if (*address == 0) {
1586 pr_info("it87: Base address not set, skipping\n"); 1587 pr_info("Base address not set, skipping\n");
1587 goto exit; 1588 goto exit;
1588 } 1589 }
1589 1590
1590 err = 0; 1591 err = 0;
1591 sio_data->revision = superio_inb(DEVREV) & 0x0f; 1592 sio_data->revision = superio_inb(DEVREV) & 0x0f;
1592 pr_info("it87: Found IT%04xF chip at 0x%x, revision %d\n", 1593 pr_info("Found IT%04xF chip at 0x%x, revision %d\n",
1593 chip_type, *address, sio_data->revision); 1594 chip_type, *address, sio_data->revision);
1594 1595
1595 /* in8 (Vbat) is always internal */ 1596 /* in8 (Vbat) is always internal */
@@ -1615,7 +1616,7 @@ static int __init it87_find(unsigned short *address,
1615 } else { 1616 } else {
1616 /* We need at least 4 VID pins */ 1617 /* We need at least 4 VID pins */
1617 if (reg & 0x0f) { 1618 if (reg & 0x0f) {
1618 pr_info("it87: VID is disabled (pins used for GPIO)\n"); 1619 pr_info("VID is disabled (pins used for GPIO)\n");
1619 sio_data->skip_vid = 1; 1620 sio_data->skip_vid = 1;
1620 } 1621 }
1621 } 1622 }
@@ -1651,7 +1652,7 @@ static int __init it87_find(unsigned short *address,
1651 if (sio_data->type == it8720 && !(reg & (1 << 1))) { 1652 if (sio_data->type == it8720 && !(reg & (1 << 1))) {
1652 reg |= (1 << 1); 1653 reg |= (1 << 1);
1653 superio_outb(IT87_SIO_PINX2_REG, reg); 1654 superio_outb(IT87_SIO_PINX2_REG, reg);
1654 pr_notice("it87: Routing internal VCCH to in7\n"); 1655 pr_notice("Routing internal VCCH to in7\n");
1655 } 1656 }
1656 if (reg & (1 << 0)) 1657 if (reg & (1 << 0))
1657 sio_data->internal |= (1 << 0); 1658 sio_data->internal |= (1 << 0);
@@ -1661,7 +1662,7 @@ static int __init it87_find(unsigned short *address,
1661 sio_data->beep_pin = superio_inb(IT87_SIO_BEEP_PIN_REG) & 0x3f; 1662 sio_data->beep_pin = superio_inb(IT87_SIO_BEEP_PIN_REG) & 0x3f;
1662 } 1663 }
1663 if (sio_data->beep_pin) 1664 if (sio_data->beep_pin)
1664 pr_info("it87: Beeping is supported\n"); 1665 pr_info("Beeping is supported\n");
1665 1666
1666 /* Disable specific features based on DMI strings */ 1667 /* Disable specific features based on DMI strings */
1667 board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR); 1668 board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
@@ -1675,8 +1676,7 @@ static int __init it87_find(unsigned short *address,
1675 the PWM2 duty cycle, so we disable it. 1676 the PWM2 duty cycle, so we disable it.
1676 I use the board name string as the trigger in case 1677 I use the board name string as the trigger in case
1677 the same board is ever used in other systems. */ 1678 the same board is ever used in other systems. */
1678 pr_info("it87: Disabling pwm2 due to " 1679 pr_info("Disabling pwm2 due to hardware constraints\n");
1679 "hardware constraints\n");
1680 sio_data->skip_pwm = (1 << 1); 1680 sio_data->skip_pwm = (1 << 1);
1681 } 1681 }
1682 } 1682 }
@@ -2189,28 +2189,26 @@ static int __init it87_device_add(unsigned short address,
2189 pdev = platform_device_alloc(DRVNAME, address); 2189 pdev = platform_device_alloc(DRVNAME, address);
2190 if (!pdev) { 2190 if (!pdev) {
2191 err = -ENOMEM; 2191 err = -ENOMEM;
2192 printk(KERN_ERR DRVNAME ": Device allocation failed\n"); 2192 pr_err("Device allocation failed\n");
2193 goto exit; 2193 goto exit;
2194 } 2194 }
2195 2195
2196 err = platform_device_add_resources(pdev, &res, 1); 2196 err = platform_device_add_resources(pdev, &res, 1);
2197 if (err) { 2197 if (err) {
2198 printk(KERN_ERR DRVNAME ": Device resource addition failed " 2198 pr_err("Device resource addition failed (%d)\n", err);
2199 "(%d)\n", err);
2200 goto exit_device_put; 2199 goto exit_device_put;
2201 } 2200 }
2202 2201
2203 err = platform_device_add_data(pdev, sio_data, 2202 err = platform_device_add_data(pdev, sio_data,
2204 sizeof(struct it87_sio_data)); 2203 sizeof(struct it87_sio_data));
2205 if (err) { 2204 if (err) {
2206 printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); 2205 pr_err("Platform data allocation failed\n");
2207 goto exit_device_put; 2206 goto exit_device_put;
2208 } 2207 }
2209 2208
2210 err = platform_device_add(pdev); 2209 err = platform_device_add(pdev);
2211 if (err) { 2210 if (err) {
2212 printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", 2211 pr_err("Device addition failed (%d)\n", err);
2213 err);
2214 goto exit_device_put; 2212 goto exit_device_put;
2215 } 2213 }
2216 2214