> On Thu, Feb 05, 2009 at 01:18:08PM +0000, PAtrick Gerber wrote: > > Hello all, > > > > I am working with kobject, kset and sysfs. I need, to show a complexe > > hierarchie, to add some kset in a kset. For that I use kobject > > embedded in the kset: > > > > child_kset = kset_create_and_add(name, NULL, &parent_kset->kobj); > > Yeah, that would work, but what are you really trying to show here? > I just want to show how I am creating a kset and associate it with a parent. > > This is working fine but the child kset created is not added in the > > child list of the parent kset. When I add a kobject in a kset I set > > the kset field of the kobject for that, but I can't touch the kobject > > embedded in a kset... > > You shouldn't touch the kobject within a kset, that's "private". I know that I shouldn't touch the kobject embedded in a kset (I have read so many docs from you about that ;-) this is why I ask here. > > What specifically are you trying to do here? Using ksets directly is > usually not something that anyone should be doing. > I am creating a special driver for "showing" the internal status of a FPGA. This FPGA is dynamically reconfigured with different block from different level. I was thinking that I can represent the internal hierarchy of the design inside the FPGA by different directories and files in sysfs. So I have decided, perhaps wrongly, that I need to use some kobject for each part of the design and some kset for construct the hierarchy. I need to keep a reference on each kobject created so (for me) kset was the perfect object to use. Maybe my approach is not so good? Thanks for your feedback and sorry for my english. Patrick > thanks, > > greg k-h -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ