aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/i2c/chips/menelaus.c10
-rw-r--r--drivers/net/spider_net.h3
-rw-r--r--drivers/video/omap/lcd_h3.c6
-rw-r--r--drivers/video/omap/lcd_inn1610.c6
-rw-r--r--include/linux/kernel.h22
5 files changed, 25 insertions, 22 deletions
diff --git a/drivers/i2c/chips/menelaus.c b/drivers/i2c/chips/menelaus.c
index d9c92c5e0077..66436bae11ac 100644
--- a/drivers/i2c/chips/menelaus.c
+++ b/drivers/i2c/chips/menelaus.c
@@ -49,8 +49,6 @@
49 49
50#define DRIVER_NAME "menelaus" 50#define DRIVER_NAME "menelaus"
51 51
52#define pr_err(fmt, arg...) printk(KERN_ERR DRIVER_NAME ": ", ## arg);
53
54#define MENELAUS_I2C_ADDRESS 0x72 52#define MENELAUS_I2C_ADDRESS 0x72
55 53
56#define MENELAUS_REV 0x01 54#define MENELAUS_REV 0x01
@@ -155,7 +153,7 @@ static int menelaus_write_reg(int reg, u8 value)
155 int val = i2c_smbus_write_byte_data(the_menelaus->client, reg, value); 153 int val = i2c_smbus_write_byte_data(the_menelaus->client, reg, value);
156 154
157 if (val < 0) { 155 if (val < 0) {
158 pr_err("write error"); 156 pr_err(DRIVER_NAME ": write error");
159 return val; 157 return val;
160 } 158 }
161 159
@@ -167,7 +165,7 @@ static int menelaus_read_reg(int reg)
167 int val = i2c_smbus_read_byte_data(the_menelaus->client, reg); 165 int val = i2c_smbus_read_byte_data(the_menelaus->client, reg);
168 166
169 if (val < 0) 167 if (val < 0)
170 pr_err("read error"); 168 pr_err(DRIVER_NAME ": read error");
171 169
172 return val; 170 return val;
173} 171}
@@ -1177,7 +1175,7 @@ static int menelaus_probe(struct i2c_client *client)
1177 /* If a true probe check the device */ 1175 /* If a true probe check the device */
1178 rev = menelaus_read_reg(MENELAUS_REV); 1176 rev = menelaus_read_reg(MENELAUS_REV);
1179 if (rev < 0) { 1177 if (rev < 0) {
1180 pr_err("device not found"); 1178 pr_err(DRIVER_NAME ": device not found");
1181 err = -ENODEV; 1179 err = -ENODEV;
1182 goto fail1; 1180 goto fail1;
1183 } 1181 }
@@ -1258,7 +1256,7 @@ static int __init menelaus_init(void)
1258 1256
1259 res = i2c_add_driver(&menelaus_i2c_driver); 1257 res = i2c_add_driver(&menelaus_i2c_driver);
1260 if (res < 0) { 1258 if (res < 0) {
1261 pr_err("driver registration failed\n"); 1259 pr_err(DRIVER_NAME ": driver registration failed\n");
1262 return res; 1260 return res;
1263 } 1261 }
1264 1262
diff --git a/drivers/net/spider_net.h b/drivers/net/spider_net.h
index a897beee7d5d..e1d05c0f47eb 100644
--- a/drivers/net/spider_net.h
+++ b/drivers/net/spider_net.h
@@ -494,7 +494,4 @@ struct spider_net_card {
494 struct spider_net_descr darray[0]; 494 struct spider_net_descr darray[0];
495}; 495};
496 496
497#define pr_err(fmt,arg...) \
498 printk(KERN_ERR fmt ,##arg)
499
500#endif 497#endif
diff --git a/drivers/video/omap/lcd_h3.c b/drivers/video/omap/lcd_h3.c
index 51807b4e26d1..c604d935c188 100644
--- a/drivers/video/omap/lcd_h3.c
+++ b/drivers/video/omap/lcd_h3.c
@@ -28,8 +28,6 @@
28 28
29#define MODULE_NAME "omapfb-lcd_h3" 29#define MODULE_NAME "omapfb-lcd_h3"
30 30
31#define pr_err(fmt, args...) printk(KERN_ERR MODULE_NAME ": " fmt, ## args)
32
33static int h3_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) 31static int h3_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
34{ 32{
35 return 0; 33 return 0;
@@ -48,7 +46,7 @@ static int h3_panel_enable(struct lcd_panel *panel)
48 if (!r) 46 if (!r)
49 r = tps65010_set_gpio_out_value(GPIO2, HIGH); 47 r = tps65010_set_gpio_out_value(GPIO2, HIGH);
50 if (r) 48 if (r)
51 pr_err("Unable to turn on LCD panel\n"); 49 pr_err(MODULE_NAME ": Unable to turn on LCD panel\n");
52 50
53 return r; 51 return r;
54} 52}
@@ -62,7 +60,7 @@ static void h3_panel_disable(struct lcd_panel *panel)
62 if (!r) 60 if (!r)
63 tps65010_set_gpio_out_value(GPIO2, LOW); 61 tps65010_set_gpio_out_value(GPIO2, LOW);
64 if (r) 62 if (r)
65 pr_err("Unable to turn off LCD panel\n"); 63 pr_err(MODULE_NAME ": Unable to turn off LCD panel\n");
66} 64}
67 65
68static unsigned long h3_panel_get_caps(struct lcd_panel *panel) 66static unsigned long h3_panel_get_caps(struct lcd_panel *panel)
diff --git a/drivers/video/omap/lcd_inn1610.c b/drivers/video/omap/lcd_inn1610.c
index 95604ca43301..5ef119c813e0 100644
--- a/drivers/video/omap/lcd_inn1610.c
+++ b/drivers/video/omap/lcd_inn1610.c
@@ -27,20 +27,18 @@
27 27
28#define MODULE_NAME "omapfb-lcd_h3" 28#define MODULE_NAME "omapfb-lcd_h3"
29 29
30#define pr_err(fmt, args...) printk(KERN_ERR MODULE_NAME ": " fmt, ## args)
31
32static int innovator1610_panel_init(struct lcd_panel *panel, 30static int innovator1610_panel_init(struct lcd_panel *panel,
33 struct omapfb_device *fbdev) 31 struct omapfb_device *fbdev)
34{ 32{
35 int r = 0; 33 int r = 0;
36 34
37 if (omap_request_gpio(14)) { 35 if (omap_request_gpio(14)) {
38 pr_err("can't request GPIO 14\n"); 36 pr_err(MODULE_NAME ": can't request GPIO 14\n");
39 r = -1; 37 r = -1;
40 goto exit; 38 goto exit;
41 } 39 }
42 if (omap_request_gpio(15)) { 40 if (omap_request_gpio(15)) {
43 pr_err("can't request GPIO 15\n"); 41 pr_err(MODULE_NAME ": can't request GPIO 15\n");
44 omap_free_gpio(14); 42 omap_free_gpio(14);
45 r = -1; 43 r = -1;
46 goto exit; 44 goto exit;
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index c680e1e6e9a3..b2ea36e5b6b9 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -251,10 +251,25 @@ extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
251 const void *buf, size_t len); 251 const void *buf, size_t len);
252#define hex_asc(x) "0123456789abcdef"[x] 252#define hex_asc(x) "0123456789abcdef"[x]
253 253
254#define pr_emerg(fmt, arg...) \
255 printk(KERN_EMERG fmt, ##arg)
256#define pr_alert(fmt, arg...) \
257 printk(KERN_ALERT fmt, ##arg)
258#define pr_crit(fmt, arg...) \
259 printk(KERN_CRIT fmt, ##arg)
260#define pr_err(fmt, arg...) \
261 printk(KERN_ERR fmt, ##arg)
262#define pr_warning(fmt, arg...) \
263 printk(KERN_WARNING fmt, ##arg)
264#define pr_notice(fmt, arg...) \
265 printk(KERN_NOTICE fmt, ##arg)
266#define pr_info(fmt, arg...) \
267 printk(KERN_INFO fmt, ##arg)
268
254#ifdef DEBUG 269#ifdef DEBUG
255/* If you are writing a driver, please use dev_dbg instead */ 270/* If you are writing a driver, please use dev_dbg instead */
256#define pr_debug(fmt,arg...) \ 271#define pr_debug(fmt, arg...) \
257 printk(KERN_DEBUG fmt,##arg) 272 printk(KERN_DEBUG fmt, ##arg)
258#else 273#else
259static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...) 274static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...)
260{ 275{
@@ -262,9 +277,6 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char *
262} 277}
263#endif 278#endif
264 279
265#define pr_info(fmt,arg...) \
266 printk(KERN_INFO fmt,##arg)
267
268/* 280/*
269 * Display an IP address in readable format. 281 * Display an IP address in readable format.
270 */ 282 */