]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: rtc-ds1742 nvram attribute fix
authorTorsten Ertbjerg Rasmussen <ertbjerg@gmail.com>
Wed, 17 Jun 2009 23:26:07 +0000 (16:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2009 20:03:43 +0000 (13:03 -0700)
commit98ed7b03083f56ebb2858378dc958eba811ccfbe
tree6b71b6424330a181e184e41cb46482b87ab365a2
parent0419a5cc0e0c66431e8dde8e0e348f4a3081108e
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>
drivers/rtc/rtc-ds1742.c