From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755556Ab1KQUFS (ORCPT ); Thu, 17 Nov 2011 15:05:18 -0500 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:55355 "EHLO out2.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754162Ab1KQUFP (ORCPT ); Thu, 17 Nov 2011 15:05:15 -0500 X-Sasl-enc: RxxVmkVcMpFsKCiQTo4JSkn6lQayJYw2XBe+7V8tq0wS 1321560314 Date: Thu, 17 Nov 2011 12:04:11 -0800 From: Greg KH To: Lars-Peter Clausen Cc: Greg Kroah-Hartman , Jean Delvare , Grant Likely , Jonathan Cameron , Michael Hennerich , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, spi-devel-general@lists.sourceforge.net Subject: Re: [PATCH 1/5] drivercore: Generalize module_platform_driver Message-ID: <20111117200411.GA8691@kroah.com> References: <1321434819-23678-1-git-send-email-lars@metafoo.de> <1321434819-23678-2-git-send-email-lars@metafoo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1321434819-23678-2-git-send-email-lars@metafoo.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 16, 2011 at 10:13:35AM +0100, Lars-Peter Clausen wrote: > This patch generalizes the module_platform_driver macro and introduces a new > module_driver macro. The module_driver macro takes a driver name, a register > and a unregister function for this driver type. Using these it construct the > module init and exit sections which register and unregister the driver. Since > such init/exit sections are commonly found in drivers this macro can be used > to eliminate a lot of boilerplate code. > > The macro is not intended to be used by driver modules directly, instead it > should be used to generate bus specific macros for registering drivers like > the module_platform_driver macro. > > Signed-off-by: Lars-Peter Clausen > Acked-by: Grant Likely > Acked-by: Jonathan Cameron > Acked-by: Wolfram Sang > --- > include/linux/init.h | 21 +++++++++++++++++++++ I've moved this from init.h (which is trying to get away from module-specific stuff) to device.h, which is where this really should be. thanks, greg k-h