--- linux/drivers/rtc/rtc-ds1307.c.orig	2012-11-11 02:03:14.960707406 +0000
+++ linux/drivers/rtc/rtc-ds1307.c	2012-11-11 20:38:49.648717002 +0000
@@ -4,6 +4,7 @@
  *  Copyright (C) 2005 James Chapman (ds1337 core)
  *  Copyright (C) 2006 David Brownell
  *  Copyright (C) 2009 Matthias Fuchs (rx8025 support)
+ *  Copyright (C) 2012 Bertrand Achard (nvram access fixes)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -182,7 +183,7 @@ static s32 ds1307_read_block_data_once(c
 static s32 ds1307_read_block_data(const struct i2c_client *client, u8
command,
 				  u8 length, u8 *values)
 {
-	u8 oldvalues[I2C_SMBUS_BLOCK_MAX];
+	u8 oldvalues[255];
 	s32 ret;
 	int tries = 0;
