Commit 1f7c8234 authored by Emil Medve's avatar Emil Medve Committed by Linus Torvalds

Make the pr_*() family of macros in kernel.h complete

Other/Some pr_*() macros are already defined in kernel.h, but pr_err() was
defined multiple times in several other places
Signed-off-by: default avatarEmil Medve <Emilian.Medve@Freescale.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Tony Lindgren <tony@atomide.com>
Reviewed-by: default avatarSatyam Sharma <satyam@infradead.org>
Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 76181c13
...@@ -49,8 +49,6 @@ ...@@ -49,8 +49,6 @@
#define DRIVER_NAME "menelaus" #define DRIVER_NAME "menelaus"
#define pr_err(fmt, arg...) printk(KERN_ERR DRIVER_NAME ": ", ## arg);
#define MENELAUS_I2C_ADDRESS 0x72 #define MENELAUS_I2C_ADDRESS 0x72
#define MENELAUS_REV 0x01 #define MENELAUS_REV 0x01
...@@ -155,7 +153,7 @@ static int menelaus_write_reg(int reg, u8 value) ...@@ -155,7 +153,7 @@ static int menelaus_write_reg(int reg, u8 value)
int val = i2c_smbus_write_byte_data(the_menelaus->client, reg, value); int val = i2c_smbus_write_byte_data(the_menelaus->client, reg, value);
if (val < 0) { if (val < 0) {
pr_err("write error"); pr_err(DRIVER_NAME ": write error");
return val; return val;
} }
...@@ -167,7 +165,7 @@ static int menelaus_read_reg(int reg) ...@@ -167,7 +165,7 @@ static int menelaus_read_reg(int reg)
int val = i2c_smbus_read_byte_data(the_menelaus->client, reg); int val = i2c_smbus_read_byte_data(the_menelaus->client, reg);
if (val < 0) if (val < 0)
pr_err("read error"); pr_err(DRIVER_NAME ": read error");
return val; return val;
} }
...@@ -1177,7 +1175,7 @@ static int menelaus_probe(struct i2c_client *client) ...@@ -1177,7 +1175,7 @@ static int menelaus_probe(struct i2c_client *client)
/* If a true probe check the device */ /* If a true probe check the device */
rev = menelaus_read_reg(MENELAUS_REV); rev = menelaus_read_reg(MENELAUS_REV);
if (rev < 0) { if (rev < 0) {
pr_err("device not found"); pr_err(DRIVER_NAME ": device not found");
err = -ENODEV; err = -ENODEV;
goto fail1; goto fail1;
} }
...@@ -1258,7 +1256,7 @@ static int __init menelaus_init(void) ...@@ -1258,7 +1256,7 @@ static int __init menelaus_init(void)
res = i2c_add_driver(&menelaus_i2c_driver); res = i2c_add_driver(&menelaus_i2c_driver);
if (res < 0) { if (res < 0) {
pr_err("driver registration failed\n"); pr_err(DRIVER_NAME ": driver registration failed\n");
return res; return res;
} }
......
...@@ -494,7 +494,4 @@ struct spider_net_card { ...@@ -494,7 +494,4 @@ struct spider_net_card {
struct spider_net_descr darray[0]; struct spider_net_descr darray[0];
}; };
#define pr_err(fmt,arg...) \
printk(KERN_ERR fmt ,##arg)
#endif #endif
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#define MODULE_NAME "omapfb-lcd_h3" #define MODULE_NAME "omapfb-lcd_h3"
#define pr_err(fmt, args...) printk(KERN_ERR MODULE_NAME ": " fmt, ## args)
static int h3_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) static int h3_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
{ {
return 0; return 0;
...@@ -48,7 +46,7 @@ static int h3_panel_enable(struct lcd_panel *panel) ...@@ -48,7 +46,7 @@ static int h3_panel_enable(struct lcd_panel *panel)
if (!r) if (!r)
r = tps65010_set_gpio_out_value(GPIO2, HIGH); r = tps65010_set_gpio_out_value(GPIO2, HIGH);
if (r) if (r)
pr_err("Unable to turn on LCD panel\n"); pr_err(MODULE_NAME ": Unable to turn on LCD panel\n");
return r; return r;
} }
...@@ -62,7 +60,7 @@ static void h3_panel_disable(struct lcd_panel *panel) ...@@ -62,7 +60,7 @@ static void h3_panel_disable(struct lcd_panel *panel)
if (!r) if (!r)
tps65010_set_gpio_out_value(GPIO2, LOW); tps65010_set_gpio_out_value(GPIO2, LOW);
if (r) if (r)
pr_err("Unable to turn off LCD panel\n"); pr_err(MODULE_NAME ": Unable to turn off LCD panel\n");
} }
static unsigned long h3_panel_get_caps(struct lcd_panel *panel) static unsigned long h3_panel_get_caps(struct lcd_panel *panel)
......
...@@ -27,20 +27,18 @@ ...@@ -27,20 +27,18 @@
#define MODULE_NAME "omapfb-lcd_h3" #define MODULE_NAME "omapfb-lcd_h3"
#define pr_err(fmt, args...) printk(KERN_ERR MODULE_NAME ": " fmt, ## args)
static int innovator1610_panel_init(struct lcd_panel *panel, static int innovator1610_panel_init(struct lcd_panel *panel,
struct omapfb_device *fbdev) struct omapfb_device *fbdev)
{ {
int r = 0; int r = 0;
if (omap_request_gpio(14)) { if (omap_request_gpio(14)) {
pr_err("can't request GPIO 14\n"); pr_err(MODULE_NAME ": can't request GPIO 14\n");
r = -1; r = -1;
goto exit; goto exit;
} }
if (omap_request_gpio(15)) { if (omap_request_gpio(15)) {
pr_err("can't request GPIO 15\n"); pr_err(MODULE_NAME ": can't request GPIO 15\n");
omap_free_gpio(14); omap_free_gpio(14);
r = -1; r = -1;
goto exit; goto exit;
......
...@@ -251,10 +251,25 @@ extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, ...@@ -251,10 +251,25 @@ extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
const void *buf, size_t len); const void *buf, size_t len);
#define hex_asc(x) "0123456789abcdef"[x] #define hex_asc(x) "0123456789abcdef"[x]
#define pr_emerg(fmt, arg...) \
printk(KERN_EMERG fmt, ##arg)
#define pr_alert(fmt, arg...) \
printk(KERN_ALERT fmt, ##arg)
#define pr_crit(fmt, arg...) \
printk(KERN_CRIT fmt, ##arg)
#define pr_err(fmt, arg...) \
printk(KERN_ERR fmt, ##arg)
#define pr_warning(fmt, arg...) \
printk(KERN_WARNING fmt, ##arg)
#define pr_notice(fmt, arg...) \
printk(KERN_NOTICE fmt, ##arg)
#define pr_info(fmt, arg...) \
printk(KERN_INFO fmt, ##arg)
#ifdef DEBUG #ifdef DEBUG
/* If you are writing a driver, please use dev_dbg instead */ /* If you are writing a driver, please use dev_dbg instead */
#define pr_debug(fmt,arg...) \ #define pr_debug(fmt, arg...) \
printk(KERN_DEBUG fmt,##arg) printk(KERN_DEBUG fmt, ##arg)
#else #else
static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...) static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...)
{ {
...@@ -262,9 +277,6 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * ...@@ -262,9 +277,6 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char *
} }
#endif #endif
#define pr_info(fmt,arg...) \
printk(KERN_INFO fmt,##arg)
/* /*
* Display an IP address in readable format. * Display an IP address in readable format.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment