rtc: rs5c372: fix buffer size

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>

authored by Wolfram Sang and committed by Linus Torvalds 11836494 69006096

+1 -1
+1 -1
drivers/rtc/rtc-rs5c372.c
··· 207 static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm) 208 { 209 struct rs5c372 *rs5c = i2c_get_clientdata(client); 210 - unsigned char buf[8]; 211 int addr; 212 213 dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d "
··· 207 static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm) 208 { 209 struct rs5c372 *rs5c = i2c_get_clientdata(client); 210 + unsigned char buf[7]; 211 int addr; 212 213 dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d "