]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc: rtc-ds2404: use dev_err() instead of printk()
authorJingoo Han <jg1.han@samsung.com>
Wed, 20 Feb 2013 02:15:49 +0000 (13:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:53:29 +0000 (16:53 +1100)
Fix the checkpatch warning as below:

  WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-ds2404.c

index 4539e37c22383c12cdc64807effaeb8b7b585167..b04fc4272fb3c40ba191b5280c099bd7aacfa970 100644 (file)
@@ -70,7 +70,7 @@ static int ds2404_gpio_map(struct ds2404 *chip, struct platform_device *pdev,
        for (i = 0; i < ARRAY_SIZE(ds2404_gpio); i++) {
                err = gpio_request(ds2404_gpio[i].gpio, ds2404_gpio[i].name);
                if (err) {
-                       printk(KERN_ERR "error mapping gpio %s: %d\n",
+                       dev_err(&pdev->dev, "error mapping gpio %s: %d\n",
                                ds2404_gpio[i].name, err);
                        goto err_request;
                }
@@ -177,7 +177,7 @@ static void ds2404_write_memory(struct device *dev, u16 offset,
 
        for (i = 0; i < length; i++) {
                if (out[i] != ds2404_read_byte(dev)) {
-                       printk(KERN_ERR "read invalid data\n");
+                       dev_err(dev, "read invalid data\n");
                        return;
                }
        }