lkml.org 
[lkml]   [2011]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 14/14] regulator: 88pm8607: avoid to use constraint name in driver
From
On Mon, Apr 18, 2011 at 10:30 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Mon, Apr 18, 2011 at 10:04:11PM +0800, Haojian Zhuang wrote:
>> Avoid to use constraint name in driver. So use driver_data instead to
>> store regulator name in platform driver.
>
> If this is something that's present in the current driver it should be
> fixed for 2.6.39 so should be a patch at the start of the series which
> can be applied separately to the others.
>
>> +             /* pdata->driver_data stores the name of regulator */
>> +             if (!strcmp(info->desc.name, pdata->driver_data))
>>                       break;
>
> Why not just use #defines in the header?  It'd be less error prone if
> nothing else.
>

I don't understand this. desc.name is assigned in regulator driver.
pdata->driver_data is assigned in platform driver. I need to use same
name to link them together.
--
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-04-18 17:41    [W:0.068 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site