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 <ertbjerg@gmail.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 file changed