From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753089Ab0LHQDV (ORCPT ); Wed, 8 Dec 2010 11:03:21 -0500 Received: from cantor2.suse.de ([195.135.220.15]:48996 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053Ab0LHQDT (ORCPT ); Wed, 8 Dec 2010 11:03:19 -0500 Date: Wed, 8 Dec 2010 08:02:55 -0800 From: Greg KH To: Sebastian Ott Cc: Kay Sievers , linux-kernel@vger.kernel.org Subject: Re: [RFC] bind/unbind uevent Message-ID: <20101208160255.GB10313@suse.de> References: <20101207162755.GA32328@suse.de> <20101207183305.GA21802@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 08, 2010 at 11:18:27AM +0100, Sebastian Ott wrote: > On Tue, 7 Dec 2010, Kay Sievers wrote: > > On Tue, Dec 7, 2010 at 19:33, Greg KH wrote: > > > On Tue, Dec 07, 2010 at 06:29:37PM +0100, Sebastian Ott wrote: > > > > >> So I'm searching for a trigger when these attributes are created, or > > >> in other words when the device is useable, which I think translates to > > >> when a driver is bound to this device. > > > > > > Again, KOBJ_ADD is the correct one. > > > > > > If your driver is creating sysfs attributes on its own, that's a bug and > > > should be fixed. > > > > Sounds a bit like the driver should create its own child device with > > its own properties, instead of mangling around with attributes at a > > device it binds to. > > Yes, I get that feeling too. But I'm talking about existing drivers > and I don't think I can change their whole structure. It's just a matter of putting the attributes in a table and passing that to the bus code the driver registers with. Only a minor change in the driver is needed to resolve this. good luck, greg k-h