Re: [PATCH v3] rtc: ds1307: generalise ram size and offset
From: Wolfram Sang
Date: Tue Feb 07 2012 - 09:56:54 EST
> 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
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/ |
Description: Digital signature