lkml.org 
[lkml]   [2011]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC] drivercore: Add helper macro for platform_driver boilerplate
On Wed, Oct 5, 2011 at 12:56 AM, Greg KH <greg@kroah.com> wrote:
> On Tue, Oct 04, 2011 at 05:26:55PM -0600, Grant Likely wrote:
>> For simple modules that contain a single platform_driver without any
>> additional setup code then ends up being a block of duplicated
>> boilerplate.  This patch adds a new macro, module_platform_driver(),
>> which replaces the module_init()/module_exit() registrations with
>> template functions.
>>
>> This patch also converts all the relevant spi drivers to use the new
>> macro.  There are a lot of drivers in the tree that are using this
>> pattern and could be converted.
>>
>> It also fixes up some incorrect section annotations where I found
>> them.
>>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>> ---
>>
>> I think this is useful, and I like the diffstat that it produces.
>> What does everyone else think of this approach?  I can do versions for
>> i2c_drivers and spi_drivers too.
>>
>> This is *not* tested very much.  I'm circulating mostly for review for
>> now.
>
> The idea looks sane to me, I like the diffstat it ends up creating, nice
> job.

Thanks. Can I take that as your a-b? Can I merge it via the spi tree?

g.
--
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/

\
 
 \ /
  Last update: 2011-10-05 18:45    [W:0.928 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site