diff options
Diffstat (limited to 'drivers/i2c/chips/menelaus.c')
-rw-r--r-- | drivers/i2c/chips/menelaus.c | 10 |
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 | ||