aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-rs5c372.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-02-21 19:45:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 20:22:29 -0500
commit0c6516ea46191e0385a9f8489c672ebfbc10d490 (patch)
treedbda9b565446b569f3c3a311679b94c5fbd580fc /drivers/rtc/rtc-rs5c372.c
parent0fae82378ad55a7dfd03f5f6fb092798d8019bc3 (diff)
rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug()
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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-rs5c372.c')
-rw-r--r--drivers/rtc/rtc-rs5c372.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c
index 76f565ae384d..581739f40097 100644
--- a/drivers/rtc/rtc-rs5c372.c
+++ b/drivers/rtc/rtc-rs5c372.c
@@ -311,8 +311,7 @@ static int rs5c_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
311 buf &= ~RS5C_CTRL1_AALE; 311 buf &= ~RS5C_CTRL1_AALE;
312 312
313 if (i2c_smbus_write_byte_data(client, addr, buf) < 0) { 313 if (i2c_smbus_write_byte_data(client, addr, buf) < 0) {
314 printk(KERN_WARNING "%s: can't update alarm\n", 314 dev_warn(dev, "can't update alarm\n");
315 rs5c->rtc->name);
316 status = -EIO; 315 status = -EIO;
317 } else 316 } else
318 rs5c->regs[RS5C_REG_CTRL1] = buf; 317 rs5c->regs[RS5C_REG_CTRL1] = buf;
@@ -381,7 +380,7 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t)
381 addr = RS5C_ADDR(RS5C_REG_CTRL1); 380 addr = RS5C_ADDR(RS5C_REG_CTRL1);
382 buf[0] = rs5c->regs[RS5C_REG_CTRL1] & ~RS5C_CTRL1_AALE; 381 buf[0] = rs5c->regs[RS5C_REG_CTRL1] & ~RS5C_CTRL1_AALE;
383 if (i2c_smbus_write_byte_data(client, addr, buf[0]) < 0) { 382 if (i2c_smbus_write_byte_data(client, addr, buf[0]) < 0) {
384 pr_debug("%s: can't disable alarm\n", rs5c->rtc->name); 383 dev_dbg(dev, "can't disable alarm\n");
385 return -EIO; 384 return -EIO;
386 } 385 }
387 rs5c->regs[RS5C_REG_CTRL1] = buf[0]; 386 rs5c->regs[RS5C_REG_CTRL1] = buf[0];
@@ -395,7 +394,7 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t)
395 for (i = 0; i < sizeof(buf); i++) { 394 for (i = 0; i < sizeof(buf); i++) {
396 addr = RS5C_ADDR(RS5C_REG_ALARM_A_MIN + i); 395 addr = RS5C_ADDR(RS5C_REG_ALARM_A_MIN + i);
397 if (i2c_smbus_write_byte_data(client, addr, buf[i]) < 0) { 396 if (i2c_smbus_write_byte_data(client, addr, buf[i]) < 0) {
398 pr_debug("%s: can't set alarm time\n", rs5c->rtc->name); 397 dev_dbg(dev, "can't set alarm time\n");
399 return -EIO; 398 return -EIO;
400 } 399 }
401 } 400 }
@@ -405,8 +404,7 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t)
405 addr = RS5C_ADDR(RS5C_REG_CTRL1); 404 addr = RS5C_ADDR(RS5C_REG_CTRL1);
406 buf[0] = rs5c->regs[RS5C_REG_CTRL1] | RS5C_CTRL1_AALE; 405 buf[0] = rs5c->regs[RS5C_REG_CTRL1] | RS5C_CTRL1_AALE;
407 if (i2c_smbus_write_byte_data(client, addr, buf[0]) < 0) 406 if (i2c_smbus_write_byte_data(client, addr, buf[0]) < 0)
408 printk(KERN_WARNING "%s: can't enable alarm\n", 407 dev_warn(dev, "can't enable alarm\n");
409 rs5c->rtc->name);
410 rs5c->regs[RS5C_REG_CTRL1] = buf[0]; 408 rs5c->regs[RS5C_REG_CTRL1] = buf[0];
411 } 409 }
412 410