[lkml]   [2010]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 13/14] Regulators: wm8400 - cleanup platform driver data handling
On Wed, Feb 24, 2010 at 10:25:49AM +0000, Mark Brown wrote:
> On Tue, Feb 23, 2010 at 11:38:50PM -0800, Dmitry Torokhov wrote:
> > Driver data set by platform_set_drvdata() is for private use of
> > the driver currently bound to teh device and not for use by parent,
> > subsystem and anyone else.
> >
> > Also have wm8400_register_regulator() accept 'sturct wm8400 *'
> > instead of generic device structure.
> Nack due to this change - this change would make it impossible for
> callers to actually call the function. Note that nothing including only
> wm8400.h even has a struct declaration, much less defniition, for struct
> wm8400.

If you notice I added forward declaration of "struct wm8400" to wm8400.h
thus users can pass around pointer to the structure.

I really think we should refrain from passing naked 'struct device *'
pointers as much as possible since it is error prone. Otherwise
wm8400_register_regulator has no way of ensuting that passed 'dev' is
indeed wm8400.


 \ /
  Last update: 2010-02-24 20:05    [W:0.055 / U:23.996 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site