Skip to content

Commit

Permalink
rtc: rs5c372: fix buffer size
Browse files Browse the repository at this point in the history
Match the buffer size to the amount of initialized values.  Before, it was
one too big and thus destroyed the neighbouring register causing the clock
to run at false speeds.

Reported-by: Andre van Rooyen <a.v.rooyen@sercom.nl>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Wolfram Sang authored and Linus Torvalds committed Dec 23, 2010
1 parent 6900609 commit 1183649
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-rs5c372.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int rs5c372_get_datetime(struct i2c_client *client, struct rtc_time *tm)
static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm)
{
struct rs5c372 *rs5c = i2c_get_clientdata(client);
unsigned char buf[8];
unsigned char buf[7];
int addr;

dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d "
Expand Down

0 comments on commit 1183649

Please sign in to comment.