]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
MENELAUS: Remove unnecessary pr_err definition
authorFelipe Balbi <felipe.lima@indt.org.br>
Fri, 10 Aug 2007 12:01:51 +0000 (08:01 -0400)
committerTony Lindgren <tony@atomide.com>
Mon, 13 Aug 2007 08:49:52 +0000 (01:49 -0700)
Instead of defining a pr_err() macro, we can use dev_err() macro.

Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/i2c/chips/menelaus.c

index 48a7e2f0bdd3c87d9385bd32bb675d52abd88835..1c4d8ab0b1497074465c82746b234fb835793059 100644 (file)
@@ -1,4 +1,3 @@
-#define DEBUG
 /*
  * Copyright (C) 2004 Texas Instruments, Inc.
  *
@@ -50,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
@@ -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);
 
        if (val < 0) {
-               pr_err("write error");
+               dev_err(&the_menelaus->client->dev, "write error");
                return val;
        }
 
@@ -168,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");
+               dev_err(&the_menelaus->client->dev, "read error");
 
        return val;
 }
@@ -1178,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");
+               dev_err(&client->dev, "device not found");
                err = -ENODEV;
                goto fail1;
        }
@@ -1207,7 +1204,7 @@ static int menelaus_probe(struct i2c_client *client)
        mutex_init(&menelaus->lock);
        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);
        if (val < 0)
@@ -1259,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");
+               dev_err(&the_menelaus->client->dev, "driver registration failed\n");
                return res;
        }