lkml.org 
[lkml]   [2004]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: device/kobject naming
Date
On Feb 25, 2004, at 6:18 PM, Greg KH wrote:
>
> No, I think you are confused. The only thing that has to be unique in
> the kobject/device name is it must be unique for the bus it is on.

I must be confused. device_initialize() sets the new device->kobj->kset
to devices_subsys.kset. Then device_add() calls kobject_add(), which
appends device->kobj to its kset. As we've already discussed,
devices_subsys is a global list of all registered devices in the
system, not a per-bus list.

It doesn't look like this will actually cause an immediate error (in
that the sysfs directory created will be different per bus), but you
could end up with two devices named "foo" in the devices_subsys list,
even if they're on different busses.

--
Hollis Blanchard
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.044 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site