[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120207145652.GH2539@pengutronix.de>
Date: Tue, 7 Feb 2012 15:56:52 +0100
From: Wolfram Sang <w.sang@...gutronix.de>
To: Austin Boyle <Austin.Boyle@...atnet.com>
Cc: rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] rtc: ds1307: generalise ram size and offset
> So if you have multiple RTCs, even of the same type, they would be in
> rtc0, rtc1, rtc2
>
> Since they each have their own nvram, does it matter if the size is
> changed?
Yes, because currently you pass a pointer to a static struct to the
sysfs_bin_attribute. If you change the size of the static struct to
another value, all other instances will get the new size, too, because
they still use the pointer to it.
You could just delete the size from the static struct, copy it over and
add the correct size to the copy and pass the copy to create_bin_file().
Or you initialize directly.
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists