From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Tue, 14 Jul 2009 21:24:12 +0000 Subject: Re: [PATCH] Explicitly disable BT radio using rfkill interface on Message-Id: List-Id: References: <4A4A8B6D.3060509@dell.com> In-Reply-To: <4A4A8B6D.3060509@dell.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: linux-hotplug@vger.kernel.org On Tue, Jul 14, 2009 at 23:00, Mario Limonciello wrote: Ok, I took a look first over the stuff we currently have. What kind of directory is that? I've never seen such a thing: sprintf(devname, "%s/usb/hid/hiddev%d", devpath, i); > I'll split that up into some more readable for loops.  I was > just trying to walk through the bus to find the appropriate usb_device to > match and return. Why do you need to *find* the device at all? Same question for the normal call case too, not only the resume case. We hook into the event for _this_ device, and we also have $DEVNAME in the environment already that points to the raw USB device node file, which we can directly open() without any *find*. Why do we need to iterate over all other USB devices to find ourself? What do I miss? > Again, i'm having to rely on earlier rules > for parent device information.  If there is a better way to do this, can you > please advise? What is the event you hook in, the bluetooth USB interface? The USB device you need to re-configure is still the parent of that device, right? Thanks, Kay