Skip to content
Commit 3a729700 authored by Torsten Ertbjerg Rasmussen's avatar Torsten Ertbjerg Rasmussen Committed by Linus Torvalds
Browse files

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: default avatarTorsten Ertbjerg Rasmussen <ertbjerg@gmail.com>
Signed-off-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 27570497
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment