Re: [PATCH v9 6/7] PCI: document SR-IOV sysfs entries
From: Yu Zhao
Date: Tue Feb 17 2009 - 23:43:42 EST
On Wed, Feb 18, 2009 at 11:49:10AM +0800, Greg KH wrote:
> On Tue, Feb 17, 2009 at 08:50:21PM +0800, Yu Zhao wrote:
> > Hi Greg,
> >
> > The `struct device' is preferred over the `struct kobject' in all cases
> > that create subdirectory in sysfs, is this true?
>
> If you have a parent directory being controlled by a struct device, yes.
Thanks! Do we need to document this somewhere?
> > I'd like to create a subdirectory under PCI device sysfs directory and
> > put some symbol links into that directory (only symbol links). Should I
> > use `device' or `kobject'? Currently I use `device' and get two extra
> > file/directory (uevent and power) which look like useless for my case
> > because this subdirectory doesn't reflect a real device.
>
> Neither, just use an attribute group, no new struct device should be
> needed at all.
Yes, I was thinking using an attribute group, however, it looks like we
can't put symbol link into a group. Maybe I'm wrong, shed some light,
please?
Regards,
Yu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/