aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1307.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-ds1307.c')
-rw-r--r--drivers/rtc/rtc-ds1307.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 836710ce750e..970a236b147a 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -322,12 +322,7 @@ static int ds1307_get_time(struct device *dev, struct rtc_time *t)
322 return -EIO; 322 return -EIO;
323 } 323 }
324 324
325 dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x\n", 325 dev_dbg(dev, "%s: %7ph\n", "read", ds1307->regs);
326 "read",
327 ds1307->regs[0], ds1307->regs[1],
328 ds1307->regs[2], ds1307->regs[3],
329 ds1307->regs[4], ds1307->regs[5],
330 ds1307->regs[6]);
331 326
332 t->tm_sec = bcd2bin(ds1307->regs[DS1307_REG_SECS] & 0x7f); 327 t->tm_sec = bcd2bin(ds1307->regs[DS1307_REG_SECS] & 0x7f);
333 t->tm_min = bcd2bin(ds1307->regs[DS1307_REG_MIN] & 0x7f); 328 t->tm_min = bcd2bin(ds1307->regs[DS1307_REG_MIN] & 0x7f);
@@ -398,9 +393,7 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t)
398 break; 393 break;
399 } 394 }
400 395
401 dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x\n", 396 dev_dbg(dev, "%s: %7ph\n", "write", buf);
402 "write", buf[0], buf[1], buf[2], buf[3],
403 buf[4], buf[5], buf[6]);
404 397
405 result = ds1307->write_block_data(ds1307->client, 398 result = ds1307->write_block_data(ds1307->client,
406 ds1307->offset, 7, buf); 399 ds1307->offset, 7, buf);
@@ -617,8 +610,8 @@ ds1307_nvram_write(struct file *filp, struct kobject *kobj,
617 610
618/*----------------------------------------------------------------------*/ 611/*----------------------------------------------------------------------*/
619 612
620static int __devinit ds1307_probe(struct i2c_client *client, 613static int ds1307_probe(struct i2c_client *client,
621 const struct i2c_device_id *id) 614 const struct i2c_device_id *id)
622{ 615{
623 struct ds1307 *ds1307; 616 struct ds1307 *ds1307;
624 int err = -ENODEV; 617 int err = -ENODEV;
@@ -938,7 +931,7 @@ exit_free:
938 return err; 931 return err;
939} 932}
940 933
941static int __devexit ds1307_remove(struct i2c_client *client) 934static int ds1307_remove(struct i2c_client *client)
942{ 935{
943 struct ds1307 *ds1307 = i2c_get_clientdata(client); 936 struct ds1307 *ds1307 = i2c_get_clientdata(client);
944 937
@@ -963,7 +956,7 @@ static struct i2c_driver ds1307_driver = {
963 .owner = THIS_MODULE, 956 .owner = THIS_MODULE,
964 }, 957 },
965 .probe = ds1307_probe, 958 .probe = ds1307_probe,
966 .remove = __devexit_p(ds1307_remove), 959 .remove = ds1307_remove,
967 .id_table = ds1307_id, 960 .id_table = ds1307_id,
968}; 961};
969 962