From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Smirl Date: Mon, 28 Feb 2005 19:07:37 +0000 Subject: Re: event sequencing Message-Id: <9e47339105022811075a6b4d0e@mail.gmail.com> List-Id: References: <9e473391050225081838f673c7@mail.gmail.com> In-Reply-To: <9e473391050225081838f673c7@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, 28 Feb 2005 12:25:26 +0100, Kay Sievers wrote: > It may work as a child of the physical device. Or something like: > net/bridge/br_sysfs_if.c:br_sysfs_addif() I can make this work with a small pactch to drivers/base/class.c I need to modify class_device_add to not stomp the parent field if it is passed in. Greg, is this a reasonable way to fix this, or is a new API that explicitly passes in the parent needed, or do you just hate the whole idea in general? === class.c 1.57 vs edited ==--- 1.57/drivers/base/class.c 2004-12-21 19:29:34 -05:00 +++ edited/class.c 2005-02-28 14:03:46 -05:00 @@ -417,7 +417,7 @@ /* first, register with generic layer. */ kobject_set_name(&class_dev->kobj, "%s", class_dev->class_id); - if (parent) + if (parent && !class_dev->kobj.parent) class_dev->kobj.parent = &parent->subsys.kset.kobj; if ((error = kobject_add(&class_dev->kobj))) -- Jon Smirl jonsmirl@gmail.com ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel