Patchwork [1/2] rtc: ds1307: remove superfluous initialization

login
register
mail settings
Submitter Wolfram Sang
Date April 5, 2012, 12:44 p.m.
Message ID <1333629853-32696-2-git-send-email-w.sang@pengutronix.de>
Download mbox | patch
Permalink /patch/150949/
State New
Headers show

Comments

Wolfram Sang - April 5, 2012, 12:44 p.m.
ds1307 was kzalloced, so no need to zero members of the struct.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
 drivers/rtc/rtc-ds1307.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Joakim Tjernlund - April 5, 2012, 12:53 p.m.
Wolfram Sang <w.sang@pengutronix.de> wrote on 2012/04/05 14:44:12:
>
> ds1307 was kzalloced, so no need to zero members of the struct.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>

Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>

Patch

diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index cd188ab..51f1fd7 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -637,7 +637,6 @@  static int __devinit ds1307_probe(struct i2c_client *client,
 
 	ds1307->client	= client;
 	ds1307->type	= id->driver_data;
-	ds1307->offset	= 0;
 
 	buf = ds1307->regs;
 	if (i2c_check_functionality(adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) {