Messages in this thread | | | From | Hollis Blanchard <> | Subject | Re: device/kobject naming | Date | Thu, 26 Feb 2004 15:31:50 -0600 |
| |
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/
| |