>>-----Original Message-----
>>From: Kevin Hilman [mailto:[email protected]]
>>Sent: Wednesday, April 28, 2010 12:32 AM
>>To: Gopinath, Thara
>>Cc: [email protected]; [email protected]; Cousson, Benoit; Sripathy, 
>>Vishwanath; Sawant, Anand
>>Subject: Re: [PATCHv3 12/22] OMAP3: PM: Minimizing the passing around of sr 
>>id in smartreflex.c
>>
>>Thara Gopinath <[email protected]> writes:
>>
>>> This patch ensures that sr id is passed as a parameter only to
>>> public APIs in smartreflex.c and other APIs in smartreflex.c
>>> uses the omap_sr strucutres.
>>>
>>> Signed-off-by: Thara Gopinath <[email protected]>
>>
>>Good change, but...
>>
>>> ---
>>>  arch/arm/mach-omap2/smartreflex.c |   36 
>>> +++++++++++++-----------------------
>>>  1 files changed, 13 insertions(+), 23 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/smartreflex.c 
>>> b/arch/arm/mach-omap2/smartreflex.c
>>> index fffd5f7..c6942e9 100644
>>> --- a/arch/arm/mach-omap2/smartreflex.c
>>> +++ b/arch/arm/mach-omap2/smartreflex.c
>>> @@ -190,16 +190,8 @@ static void sr_configure(struct omap_sr *sr)
>>>     sr->is_sr_reset = 0;
>>>  }
>>>
>>> -static void sr_start_vddautocomp(int srid)
>>> +static void sr_start_vddautocomp(struct omap_sr *sr)
>>>  {
>>> -   struct omap_sr *sr = _sr_lookup(srid);
>>> -
>>> -   if (!sr) {
>>> -           pr_warning("omap_sr struct corresponding to SR%d not found\n",
>>> -                                                           srid + 1);
>>> -           return;
>>> -   }
>>> -
>>>     if (!sr_class || !(sr_class->enable)) {
>>>             pr_warning("smartreflex class driver not registered\n");
>>>             return;
>>> @@ -211,30 +203,22 @@ static void sr_start_vddautocomp(int srid)
>>>     }
>>>
>>>     sr->is_autocomp_active = 1;
>>> -   if (!sr_class->enable(srid)) {
>>> +   if (!sr_class->enable(sr->srid)) {
>>
>>... the class3 layer is still taking SR ID as a parameter and it
>>should also just take an sr_info ptr.

Hi Kevin,

sr_info is an internal structure for smartreflex driver. The intention behind 
this patch is all external API's pass the srid and internally the driver static 
APIs take sr_info as parameter. I did not realize this point till now when I 
was doing the actual changes and hence the late reply :-)

Regards
Thara

>>
>>Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to