mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: Emil Medve <[email protected]> Cc: Jean Delvare <[email protected]> Cc: Jeff Garzik <[email protected]> Cc: "Antonino A. Daplas" <[email protected]> Cc: Tony Lindgren <[email protected]> Reviewed-by: Satyam Sharma <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
76181c134f
commit
1f7c8234c7
5 changed files with 25 additions and 22 deletions
|
|
@ -49,8 +49,6 @@
|
|||
|
||||
#define DRIVER_NAME "menelaus"
|
||||
|
||||
#define pr_err(fmt, arg...) printk(KERN_ERR DRIVER_NAME ": ", ## arg);
|
||||
|
||||
#define MENELAUS_I2C_ADDRESS 0x72
|
||||
|
||||
#define MENELAUS_REV 0x01
|
||||
|
|
@ -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);
|
||||
|
||||
if (val < 0) {
|
||||
pr_err("write error");
|
||||
pr_err(DRIVER_NAME ": write error");
|
||||
return val;
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +165,7 @@ static int menelaus_read_reg(int reg)
|
|||
int val = i2c_smbus_read_byte_data(the_menelaus->client, reg);
|
||||
|
||||
if (val < 0)
|
||||
pr_err("read error");
|
||||
pr_err(DRIVER_NAME ": read error");
|
||||
|
||||
return val;
|
||||
}
|
||||
|
|
@ -1177,7 +1175,7 @@ static int menelaus_probe(struct i2c_client *client)
|
|||
/* If a true probe check the device */
|
||||
rev = menelaus_read_reg(MENELAUS_REV);
|
||||
if (rev < 0) {
|
||||
pr_err("device not found");
|
||||
pr_err(DRIVER_NAME ": device not found");
|
||||
err = -ENODEV;
|
||||
goto fail1;
|
||||
}
|
||||
|
|
@ -1258,7 +1256,7 @@ static int __init menelaus_init(void)
|
|||
|
||||
res = i2c_add_driver(&menelaus_i2c_driver);
|
||||
if (res < 0) {
|
||||
pr_err("driver registration failed\n");
|
||||
pr_err(DRIVER_NAME ": driver registration failed\n");
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue