[lkml]   [2011]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 13/14] regulator: check name in initialization of max8925
On Mon, Apr 18, 2011 at 10:28 PM, Mark Brown
<> wrote:
> On Mon, Apr 18, 2011 at 10:04:10PM +0800, Haojian Zhuang wrote:
>> Check name in initialization of max8925 regulator driver.
> What name are we checking and why do we need to check it?  I've no idea
> what the patch is supposed to do which makes it hard to review.
Actually, I didn't submit any platform driver before. So I can't
attach the related patch on
platform driver. After 2.6.39, I'll upload patches on platform driver.

In this original design, regulator data is assigned in platform driver
separately with index.
If I missed to define regulator[0] in platform data, the regulator
driver will meet failure
because of checking in max8925-core.c. The regulator[0] always means Buck0.

So I want to avoid to use the index and check regulator[] one by one.
I use a pointer to link
all regulator data together. I just need to check whether the
regulator pointer is valid or not.

>> +++ b/drivers/regulator/max8925-regulator.c
>> @@ -174,7 +174,7 @@ static struct regulator_ops max8925_regulator_ldo_ops = {
>>  #define MAX8925_SDV(_id, min, max, step)                     \
>>  {                                                            \
>>       .desc   = {                                             \
>> -             .name   = "SDV" #_id,                           \
>> +             .name   = "SD" #_id,                            \
> The above isn't obviously correct - it changes the name that's assigned
> from matching the macro used to something different.

The name isn't used by others. So I change it to SDx in order to
compare regulator name.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2011-04-18 17:35    [W:0.056 / U:2.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site