aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips
diff options
context:
space:
mode:
authorEmil Medve <Emilian.Medve@Freescale.com>2007-10-17 02:29:48 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:57 -0400
commit1f7c8234c7a68c2ccc2a33f3b7d48057980e7c35 (patch)
treec05f0babd6d6be59952c2dc62ade215723e03a93 /drivers/i2c/chips
parent76181c134f87479fa13bf2548ddf2999055d34d4 (diff)
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 <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: Satyam Sharma <satyam@infradead.org> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/i2c/chips')
-rw-r--r--drivers/i2c/chips/menelaus.c10
1 files changed, 4 insertions, 6 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