Skip to content

Commit

Permalink
rtc: rtc-ds2404: use dev_err() instead of printk()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jingoo Han authored and torvalds committed Feb 22, 2013
1 parent 34650f9 commit 0fae823
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/rtc/rtc-ds2404.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 0fae823

Please sign in to comment.