[lkml]   [2012]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/1] mfd: Fix runtime warning caused by duplicate device registration
Hi Lee,

On Thu, Jul 05, 2012 at 02:12:09PM +0100, Lee Jones wrote:
> On 05/07/12 14:03, Mark Brown wrote:
> >On Thu, Jul 05, 2012 at 01:55:50PM +0100, Lee Jones wrote:
> >>On 05/07/12 13:45, Mark Brown wrote:
> >
> >>>Right, so what I'm saying is that what I'd expect unless there's
> >>>something unusual going on is that you wouldn't be doing the separate
> >>>registration of the AB8500 here and would instead be passing the
> >>>platform data for the AB8500 through in the same way you pass the DT
> >>>data through.
> >
> >>Then were would you register it, if not here?
> >
> >Same place as for DT.
> That is a possibility, but the idea is to reduce code in the
> platform area, not add to it. We'd also need a completely separate
> platform_data structure to the one we use for platform registration,
> as much of it has now been moved into Device Tree. The regulators
> are a good example of this, but there's also GPIO information which
> is no longer relevant etc.
> I do believe that registering the AB8500 from the DB8500 is
> appropriate though, for the simple reason that the AB8500 is a
> sub-device to the DB8500. I think this is the correct thing to do.
I agree with you here, and I thus see no reasons why we should have a
different code path for DT and !DT cases.

> But anyway, as I said before, that ship has sailed. We _already_ do
> this. All this patch does is prevent the AB8500 from being
> registered twice when DT is not enabled.
Sure, and it does exactly that. But this does look like a workaround rather
than an actual fix. And Mark is right about showing the wrong example with
this kind of patches for other MFD drivers.
I'd prefer seeig the !DT support removed for now until you can find a proper
and common solution for both DT and !DT cases.


Intel Open Source Technology Centre

 \ /
  Last update: 2012-07-05 16:21    [W:0.098 / U:50.852 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site