Commit b3a19cb7 authored by Felipe Balbi's avatar Felipe Balbi Committed by Tony Lindgren

MENELAUS: Remove unnecessary pr_err definition

Instead of defining a pr_err() macro, we can use dev_err() macro.
Signed-off-by: default avatarFelipe Balbi <felipe.lima@indt.org.br>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent ebd641a5
#define DEBUG
/* /*
* Copyright (C) 2004 Texas Instruments, Inc. * Copyright (C) 2004 Texas Instruments, Inc.
* *
...@@ -50,8 +49,6 @@ ...@@ -50,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
...@@ -156,7 +153,7 @@ static int menelaus_write_reg(int reg, u8 value) ...@@ -156,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"); dev_err(&the_menelaus->client->dev, "write error");
return val; return val;
} }
...@@ -168,7 +165,7 @@ static int menelaus_read_reg(int reg) ...@@ -168,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"); dev_err(&the_menelaus->client->dev, "read error");
return val; return val;
} }
...@@ -1178,7 +1175,7 @@ static int menelaus_probe(struct i2c_client *client) ...@@ -1178,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"); dev_err(&client->dev, "device not found");
err = -ENODEV; err = -ENODEV;
goto fail1; goto fail1;
} }
...@@ -1207,7 +1204,7 @@ static int menelaus_probe(struct i2c_client *client) ...@@ -1207,7 +1204,7 @@ static int menelaus_probe(struct i2c_client *client)
mutex_init(&menelaus->lock); mutex_init(&menelaus->lock);
INIT_WORK(&menelaus->work, menelaus_work); INIT_WORK(&menelaus->work, menelaus_work);
pr_info("Menelaus rev %d.%d\n", rev >> 4, rev & 0x0f); dev_info(&client->dev, "Menelaus rev %d.%d\n", rev >> 4, rev & 0x0f);
val = menelaus_read_reg(MENELAUS_VCORE_CTRL1); val = menelaus_read_reg(MENELAUS_VCORE_CTRL1);
if (val < 0) if (val < 0)
...@@ -1259,7 +1256,7 @@ static int __init menelaus_init(void) ...@@ -1259,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"); dev_err(&the_menelaus->client->dev, "driver registration failed\n");
return res; return res;
} }
......
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