From patchwork Fri Sep 30 20:56:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: rtc: ds1307: comment and format cleanup Date: Fri, 30 Sep 2011 10:56:08 -0000 From: David Anders X-Patchwork-Id: 117210 Message-Id: <1317416168-23637-1-git-send-email-x0132446@ti.com> To: Cc: , , David Anders this patch cleans up some comment and formating issues that were reported via checkpatch.pl Signed-off-by: David Anders --- drivers/rtc/rtc-ds1307.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 2a98601..811e870 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -37,7 +37,7 @@ enum ds_type { mcp7941x, rx_8025, last_ds_type /* always last */ - // rs5c372 too? different address... + /* rs5c372 too? different address... */ }; @@ -366,6 +366,10 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t) | DS1340_BIT_CENTURY; break; case mcp7941x: + /* these bits were cleared when preparing the date/time + * values and need to be set again before writing the + * buffer out to the device. + */ buf[DS1307_REG_SECS] |= MCP7941X_BIT_ST; buf[DS1307_REG_WDAY] |= MCP7941X_BIT_VBATEN; break; @@ -624,7 +628,8 @@ static int __devinit ds1307_probe(struct i2c_client *client, && !i2c_check_functionality(adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) return -EIO; - if (!(ds1307 = kzalloc(sizeof(struct ds1307), GFP_KERNEL))) + ds1307 = kzalloc(sizeof(struct ds1307), GFP_KERNEL); + if (!(ds1307)) return -ENOMEM; i2c_set_clientdata(client, ds1307);