Commit a8ca103793350bd66280d56ee58870c682b54e75

Authored by Joe Perches
Committed by Jean Delvare
1 parent 632bdb24d7

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>

Showing 1 changed file with 14 additions and 16 deletions Side-by-side Diff

drivers/hwmon/it87.c
... ... @@ -38,6 +38,8 @@
38 38 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
39 39 */
40 40  
  41 +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  42 +
41 43 #include <linux/module.h>
42 44 #include <linux/init.h>
43 45 #include <linux/slab.h>
44 46  
45 47  
46 48  
... ... @@ -1570,26 +1572,25 @@
1570 1572 case 0xffff: /* No device at all */
1571 1573 goto exit;
1572 1574 default:
1573   - pr_debug(DRVNAME ": Unsupported chip (DEVID=0x%x)\n",
1574   - chip_type);
  1575 + pr_debug("Unsupported chip (DEVID=0x%x)\n", chip_type);
1575 1576 goto exit;
1576 1577 }
1577 1578  
1578 1579 superio_select(PME);
1579 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 1582 goto exit;
1582 1583 }
1583 1584  
1584 1585 *address = superio_inw(IT87_BASE_REG) & ~(IT87_EXTENT - 1);
1585 1586 if (*address == 0) {
1586   - pr_info("it87: Base address not set, skipping\n");
  1587 + pr_info("Base address not set, skipping\n");
1587 1588 goto exit;
1588 1589 }
1589 1590  
1590 1591 err = 0;
1591 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 1594 chip_type, *address, sio_data->revision);
1594 1595  
1595 1596 /* in8 (Vbat) is always internal */
... ... @@ -1615,7 +1616,7 @@
1615 1616 } else {
1616 1617 /* We need at least 4 VID pins */
1617 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 1620 sio_data->skip_vid = 1;
1620 1621 }
1621 1622 }
... ... @@ -1651,7 +1652,7 @@
1651 1652 if (sio_data->type == it8720 && !(reg & (1 << 1))) {
1652 1653 reg |= (1 << 1);
1653 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 1657 if (reg & (1 << 0))
1657 1658 sio_data->internal |= (1 << 0);
... ... @@ -1661,7 +1662,7 @@
1661 1662 sio_data->beep_pin = superio_inb(IT87_SIO_BEEP_PIN_REG) & 0x3f;
1662 1663 }
1663 1664 if (sio_data->beep_pin)
1664   - pr_info("it87: Beeping is supported\n");
  1665 + pr_info("Beeping is supported\n");
1665 1666  
1666 1667 /* Disable specific features based on DMI strings */
1667 1668 board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
... ... @@ -1675,8 +1676,7 @@
1675 1676 the PWM2 duty cycle, so we disable it.
1676 1677 I use the board name string as the trigger in case
1677 1678 the same board is ever used in other systems. */
1678   - pr_info("it87: Disabling pwm2 due to "
1679   - "hardware constraints\n");
  1679 + pr_info("Disabling pwm2 due to hardware constraints\n");
1680 1680 sio_data->skip_pwm = (1 << 1);
1681 1681 }
1682 1682 }
1683 1683  
1684 1684  
1685 1685  
... ... @@ -2189,28 +2189,26 @@
2189 2189 pdev = platform_device_alloc(DRVNAME, address);
2190 2190 if (!pdev) {
2191 2191 err = -ENOMEM;
2192   - printk(KERN_ERR DRVNAME ": Device allocation failed\n");
  2192 + pr_err("Device allocation failed\n");
2193 2193 goto exit;
2194 2194 }
2195 2195  
2196 2196 err = platform_device_add_resources(pdev, &res, 1);
2197 2197 if (err) {
2198   - printk(KERN_ERR DRVNAME ": Device resource addition failed "
2199   - "(%d)\n", err);
  2198 + pr_err("Device resource addition failed (%d)\n", err);
2200 2199 goto exit_device_put;
2201 2200 }
2202 2201  
2203 2202 err = platform_device_add_data(pdev, sio_data,
2204 2203 sizeof(struct it87_sio_data));
2205 2204 if (err) {
2206   - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n");
  2205 + pr_err("Platform data allocation failed\n");
2207 2206 goto exit_device_put;
2208 2207 }
2209 2208  
2210 2209 err = platform_device_add(pdev);
2211 2210 if (err) {
2212   - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n",
2213   - err);
  2211 + pr_err("Device addition failed (%d)\n", err);
2214 2212 goto exit_device_put;
2215 2213 }
2216 2214