Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759712AbXLTIEV (ORCPT ); Thu, 20 Dec 2007 03:04:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755790AbXLTIEL (ORCPT ); Thu, 20 Dec 2007 03:04:11 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:46213 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751510AbXLTIEK (ORCPT ); Thu, 20 Dec 2007 03:04:10 -0500 Date: Thu, 20 Dec 2007 00:02:59 -0800 From: Greg KH To: Dave Young Cc: linux-kernel@vger.kernel.org, Kay Sievers , Alan Stern , Jonathan Corbet , Randy Dunlap Subject: Re: [RFC] kobject/kset/ktype documentation and example code updated Message-ID: <20071220080259.GA30416@kroah.com> References: <20071220003031.GA15129@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1731 Lines: 49 On Thu, Dec 20, 2007 at 03:54:40PM +0800, Dave Young wrote: > On Dec 20, 2007 8:30 AM, Greg KH wrote: > > Thanks to everyone for your last round of review comments and changes to > > the kobject documentation. > > > > I now have over 130 patches reworking the kset/ktype and kobject apis in > > the kernel tree, and here is the updated documentation and example code > > that shows how things work now. > > > > Things different from the last time around are the kobject_add() and > > kobject_init() functions now take a bunch of required parameters, and > > the kobject cleanup code is much more forgiving. > > > > I want to drop kobject_unregister() but as this patch series is so big > > already, I think it's time to let it bake in -mm and push into 2.6.25 > > before attempting it. > [--snip--] > > Hi, greg > > How about add a kobject_remove function and temporarily keep the > kobject_unregister as below until the 2.6.25: > > kobject_unregister(...) > { > ... > kobject_remove(); > kobject_uevent(); > ... > } Actually, it's not needed at all. Thanks to Kay's recent changes in the tree, a simple kobject_put() is all that is needed. The proper sysfs cleanup and uevent will happen if necessary, no housekeeping by the caller required. So I'll just nuke kobject_unregister() as it's a simple replacement with kobject_put() which will clean up the api even more :) And I'll go update the documentation... thanks, greg k-h -- 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/