* question about configfs_attribute
@ 2012-10-15 11:45 Constantine Shulyupin
2012-12-07 23:30 ` Joel Becker
0 siblings, 1 reply; 2+ messages in thread
From: Constantine Shulyupin @ 2012-10-15 11:45 UTC (permalink / raw)
To: jlbec, linux-kernel
Hi
I wonder why show and store methods are not stored inside of
configfs_attribute but stored in wrapper struct defined with
CONFIGFS_ATTR_STRUCT ?
Thanks
--
Constantine Shulyupin
http://www.MakeLinux.com/
Embedded Linux Systems,
Device Drivers, TI DaVinci
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: question about configfs_attribute
2012-10-15 11:45 question about configfs_attribute Constantine Shulyupin
@ 2012-12-07 23:30 ` Joel Becker
0 siblings, 0 replies; 2+ messages in thread
From: Joel Becker @ 2012-12-07 23:30 UTC (permalink / raw)
To: Constantine Shulyupin; +Cc: linux-kernel
On Mon, Oct 15, 2012 at 01:45:56PM +0200, Constantine Shulyupin wrote:
> Hi
>
> I wonder why show and store methods are not stored inside of
> configfs_attribute but stored in wrapper struct defined with
> CONFIGFS_ATTR_STRUCT ?
If you created a custom attribute struct and methods for
yourself, you would not have to have the show/store methods on the same
structure. The structure, and the ##item_show/store macros, are a
convenience way to do it.
It certainly could be done differently. I cloned the sysfs
approach at the time. Note that sysfs has a different methodology for
defining attributes now.
Joel
--
Life's Little Instruction Book #252
"Take good care of those you love."
http://www.jlbec.org/
jlbec@evilplan.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-07 23:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15 11:45 question about configfs_attribute Constantine Shulyupin
2012-12-07 23:30 ` Joel Becker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox