diff options
author | Joe Perches <joe@perches.com> | 2010-10-20 02:51:49 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-01-08 13:55:27 -0500 |
commit | 512504e9f5489dbe85c80fd2c1b44ab5a8e0d5fa (patch) | |
tree | e240e462a53fbee6526a1d60a621a98b21905458 /drivers/hwmon/smsc47m1.c | |
parent | bf1a85eff87eeb0651b1c5b348d51206ec7c0ef5 (diff) |
hwmon: (smsc47m1) 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/smsc47m1.c')
-rw-r--r-- | drivers/hwmon/smsc47m1.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/hwmon/smsc47m1.c b/drivers/hwmon/smsc47m1.c index 8fa462f2b570..f44a89aac381 100644 --- a/drivers/hwmon/smsc47m1.c +++ b/drivers/hwmon/smsc47m1.c | |||
@@ -26,6 +26,8 @@ | |||
26 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 26 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
30 | |||
29 | #include <linux/module.h> | 31 | #include <linux/module.h> |
30 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
31 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
@@ -435,30 +437,29 @@ static int __init smsc47m1_find(unsigned short *addr, | |||
435 | */ | 437 | */ |
436 | switch (val) { | 438 | switch (val) { |
437 | case 0x51: | 439 | case 0x51: |
438 | pr_info(DRVNAME ": Found SMSC LPC47B27x\n"); | 440 | pr_info("Found SMSC LPC47B27x\n"); |
439 | sio_data->type = smsc47m1; | 441 | sio_data->type = smsc47m1; |
440 | break; | 442 | break; |
441 | case 0x59: | 443 | case 0x59: |
442 | pr_info(DRVNAME ": Found SMSC LPC47M10x/LPC47M112/LPC47M13x\n"); | 444 | pr_info("Found SMSC LPC47M10x/LPC47M112/LPC47M13x\n"); |
443 | sio_data->type = smsc47m1; | 445 | sio_data->type = smsc47m1; |
444 | break; | 446 | break; |
445 | case 0x5F: | 447 | case 0x5F: |
446 | pr_info(DRVNAME ": Found SMSC LPC47M14x\n"); | 448 | pr_info("Found SMSC LPC47M14x\n"); |
447 | sio_data->type = smsc47m1; | 449 | sio_data->type = smsc47m1; |
448 | break; | 450 | break; |
449 | case 0x60: | 451 | case 0x60: |
450 | pr_info(DRVNAME ": Found SMSC LPC47M15x/LPC47M192/LPC47M997\n"); | 452 | pr_info("Found SMSC LPC47M15x/LPC47M192/LPC47M997\n"); |
451 | sio_data->type = smsc47m1; | 453 | sio_data->type = smsc47m1; |
452 | break; | 454 | break; |
453 | case 0x6B: | 455 | case 0x6B: |
454 | if (superio_inb(SUPERIO_REG_DEVREV) & 0x80) { | 456 | if (superio_inb(SUPERIO_REG_DEVREV) & 0x80) { |
455 | pr_debug(DRVNAME ": " | 457 | pr_debug("Found SMSC LPC47M233, unsupported\n"); |
456 | "Found SMSC LPC47M233, unsupported\n"); | ||
457 | superio_exit(); | 458 | superio_exit(); |
458 | return -ENODEV; | 459 | return -ENODEV; |
459 | } | 460 | } |
460 | 461 | ||
461 | pr_info(DRVNAME ": Found SMSC LPC47M292\n"); | 462 | pr_info("Found SMSC LPC47M292\n"); |
462 | sio_data->type = smsc47m2; | 463 | sio_data->type = smsc47m2; |
463 | break; | 464 | break; |
464 | default: | 465 | default: |
@@ -470,7 +471,7 @@ static int __init smsc47m1_find(unsigned short *addr, | |||
470 | *addr = (superio_inb(SUPERIO_REG_BASE) << 8) | 471 | *addr = (superio_inb(SUPERIO_REG_BASE) << 8) |
471 | | superio_inb(SUPERIO_REG_BASE + 1); | 472 | | superio_inb(SUPERIO_REG_BASE + 1); |
472 | if (*addr == 0) { | 473 | if (*addr == 0) { |
473 | pr_info(DRVNAME ": Device address not set, will not use\n"); | 474 | pr_info("Device address not set, will not use\n"); |
474 | superio_exit(); | 475 | superio_exit(); |
475 | return -ENODEV; | 476 | return -ENODEV; |
476 | } | 477 | } |
@@ -479,7 +480,7 @@ static int __init smsc47m1_find(unsigned short *addr, | |||
479 | * Compaq Presario S4000NX) */ | 480 | * Compaq Presario S4000NX) */ |
480 | sio_data->activate = superio_inb(SUPERIO_REG_ACT); | 481 | sio_data->activate = superio_inb(SUPERIO_REG_ACT); |
481 | if ((sio_data->activate & 0x01) == 0) { | 482 | if ((sio_data->activate & 0x01) == 0) { |
482 | pr_info(DRVNAME ": Enabling device\n"); | 483 | pr_info("Enabling device\n"); |
483 | superio_outb(SUPERIO_REG_ACT, sio_data->activate | 0x01); | 484 | superio_outb(SUPERIO_REG_ACT, sio_data->activate | 0x01); |
484 | } | 485 | } |
485 | 486 | ||
@@ -494,7 +495,7 @@ static void smsc47m1_restore(const struct smsc47m1_sio_data *sio_data) | |||
494 | superio_enter(); | 495 | superio_enter(); |
495 | superio_select(); | 496 | superio_select(); |
496 | 497 | ||
497 | pr_info(DRVNAME ": Disabling device\n"); | 498 | pr_info("Disabling device\n"); |
498 | superio_outb(SUPERIO_REG_ACT, sio_data->activate); | 499 | superio_outb(SUPERIO_REG_ACT, sio_data->activate); |
499 | 500 | ||
500 | superio_exit(); | 501 | superio_exit(); |
@@ -823,28 +824,26 @@ static int __init smsc47m1_device_add(unsigned short address, | |||
823 | pdev = platform_device_alloc(DRVNAME, address); | 824 | pdev = platform_device_alloc(DRVNAME, address); |
824 | if (!pdev) { | 825 | if (!pdev) { |
825 | err = -ENOMEM; | 826 | err = -ENOMEM; |
826 | printk(KERN_ERR DRVNAME ": Device allocation failed\n"); | 827 | pr_err("Device allocation failed\n"); |
827 | goto exit; | 828 | goto exit; |
828 | } | 829 | } |
829 | 830 | ||
830 | err = platform_device_add_resources(pdev, &res, 1); | 831 | err = platform_device_add_resources(pdev, &res, 1); |
831 | if (err) { | 832 | if (err) { |
832 | printk(KERN_ERR DRVNAME ": Device resource addition failed " | 833 | pr_err("Device resource addition failed (%d)\n", err); |
833 | "(%d)\n", err); | ||
834 | goto exit_device_put; | 834 | goto exit_device_put; |
835 | } | 835 | } |
836 | 836 | ||
837 | err = platform_device_add_data(pdev, sio_data, | 837 | err = platform_device_add_data(pdev, sio_data, |
838 | sizeof(struct smsc47m1_sio_data)); | 838 | sizeof(struct smsc47m1_sio_data)); |
839 | if (err) { | 839 | if (err) { |
840 | printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); | 840 | pr_err("Platform data allocation failed\n"); |
841 | goto exit_device_put; | 841 | goto exit_device_put; |
842 | } | 842 | } |
843 | 843 | ||
844 | err = platform_device_add(pdev); | 844 | err = platform_device_add(pdev); |
845 | if (err) { | 845 | if (err) { |
846 | printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", | 846 | pr_err("Device addition failed (%d)\n", err); |
847 | err); | ||
848 | goto exit_device_put; | 847 | goto exit_device_put; |
849 | } | 848 | } |
850 | 849 | ||