From: Torsten Ertbjerg Rasmussen Date: Wed, 17 Jun 2009 23:26:07 +0000 (-0700) Subject: rtc: rtc-ds1742 nvram attribute fix X-Git-Tag: v2.6.31-rc1~262 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a72970054e72e6d3b5cdb7364a079f8ecae62af;p=pandora-kernel.git rtc: rtc-ds1742 nvram attribute fix The RTC driver for ds1742 / ds1743 uses a static nvram attribute. This patch replaces this static attribute with one nvram attribute for each ds174x registered. The nvram size is not the same for all types of ds174x. The nvram size is accessible as the file size of the nvram attribute in sysfs. With only a single nvram attribute, this file size will be incorrect if more than one type of ds174x is present on a system. See the comment in the removed code below. This patch have been tested with linux-2.6.28 and linux-2.6.29-rc5/6 on a custom board with one ds1743. Signed-off-by: Torsten Ertbjerg Rasmussen Signed-off-by: Alessandro Zummo Cc: Atsushi Nemoto Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed