aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-03-29 18:21:42 -0400
committerMatthew Garrett <mjg@redhat.com>2011-05-27 12:35:49 -0400
commit323623a717c7feec3f36099f4caa18b3319c5cca (patch)
treee2377ec8d9ecc41d6816741ed3ff1745c06f7d67 /drivers/platform
parentb5a4223c1ce5edbaae3db9494de8dcb2d08a755b (diff)
ibm_rtl: Use pr_fmt and pr_<level>
Remove hard coded prefixes from logging messages. Neaten RTL_DEBUG macro and uses. Convert __FUNCTION__ to __func__. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/ibm_rtl.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c
index 10563458408c..811d436cd677 100644
--- a/drivers/platform/x86/ibm_rtl.c
+++ b/drivers/platform/x86/ibm_rtl.c
@@ -22,6 +22,8 @@
22 * 22 *
23 */ 23 */
24 24
25#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
26
25#include <linux/kernel.h> 27#include <linux/kernel.h>
26#include <linux/delay.h> 28#include <linux/delay.h>
27#include <linux/module.h> 29#include <linux/module.h>
@@ -69,9 +71,10 @@ struct ibm_rtl_table {
69#define RTL_SIGNATURE 0x0000005f4c54525fULL 71#define RTL_SIGNATURE 0x0000005f4c54525fULL
70#define RTL_MASK 0x000000ffffffffffULL 72#define RTL_MASK 0x000000ffffffffffULL
71 73
72#define RTL_DEBUG(A, ...) do { \ 74#define RTL_DEBUG(fmt, ...) \
73 if (debug) \ 75do { \
74 pr_info("ibm-rtl: " A, ##__VA_ARGS__ ); \ 76 if (debug) \
77 pr_info(fmt, ##__VA_ARGS__); \
75} while (0) 78} while (0)
76 79
77static DEFINE_MUTEX(rtl_lock); 80static DEFINE_MUTEX(rtl_lock);
@@ -114,7 +117,7 @@ static int ibm_rtl_write(u8 value)
114 int ret = 0, count = 0; 117 int ret = 0, count = 0;
115 static u32 cmd_port_val; 118 static u32 cmd_port_val;
116 119
117 RTL_DEBUG("%s(%d)\n", __FUNCTION__, value); 120 RTL_DEBUG("%s(%d)\n", __func__, value);
118 121
119 value = value == 1 ? RTL_CMD_ENTER_PRTM : RTL_CMD_EXIT_PRTM; 122 value = value == 1 ? RTL_CMD_ENTER_PRTM : RTL_CMD_EXIT_PRTM;
120 123
@@ -144,8 +147,8 @@ static int ibm_rtl_write(u8 value)
144 while (ioread8(&rtl_table->command)) { 147 while (ioread8(&rtl_table->command)) {
145 msleep(10); 148 msleep(10);
146 if (count++ > 500) { 149 if (count++ > 500) {
147 pr_err("ibm-rtl: Hardware not responding to " 150 pr_err("Hardware not responding to "
148 "mode switch request\n"); 151 "mode switch request\n");
149 ret = -EIO; 152 ret = -EIO;
150 break; 153 break;
151 } 154 }
@@ -250,7 +253,7 @@ static int __init ibm_rtl_init(void) {
250 int ret = -ENODEV, i; 253 int ret = -ENODEV, i;
251 254
252 if (force) 255 if (force)
253 pr_warning("ibm-rtl: module loaded by force\n"); 256 pr_warn("module loaded by force\n");
254 /* first ensure that we are running on IBM HW */ 257 /* first ensure that we are running on IBM HW */
255 else if (efi_enabled || !dmi_check_system(ibm_rtl_dmi_table)) 258 else if (efi_enabled || !dmi_check_system(ibm_rtl_dmi_table))
256 return -ENODEV; 259 return -ENODEV;
@@ -295,7 +298,7 @@ static int __init ibm_rtl_init(void) {
295 rtl_cmd_width = ioread8(&rtl_table->cmd_granularity); 298 rtl_cmd_width = ioread8(&rtl_table->cmd_granularity);
296 rtl_cmd_type = ioread8(&rtl_table->cmd_address_type); 299 rtl_cmd_type = ioread8(&rtl_table->cmd_address_type);
297 RTL_DEBUG("rtl_cmd_width = %u, rtl_cmd_type = %u\n", 300 RTL_DEBUG("rtl_cmd_width = %u, rtl_cmd_type = %u\n",
298 rtl_cmd_width, rtl_cmd_type); 301 rtl_cmd_width, rtl_cmd_type);
299 addr = ioread32(&rtl_table->cmd_port_address); 302 addr = ioread32(&rtl_table->cmd_port_address);
300 RTL_DEBUG("addr = %#llx\n", (unsigned long long)addr); 303 RTL_DEBUG("addr = %#llx\n", (unsigned long long)addr);
301 plen = rtl_cmd_width/sizeof(char); 304 plen = rtl_cmd_width/sizeof(char);