Re: [PATCH v2 1/3] rtc: omap: Unlock and Lock rtc registers before and after register writes

From: Lokesh Vutla
Date: Thu Apr 02 2015 - 08:44:55 EST


On Thursday 02 April 2015 06:03 PM, Alexandre Belloni wrote:
> On 02/04/2015 at 16:39:09 +0530, Lokesh Vutla wrote :

[..snip..]
>> }
>>
>> +static inline void am3352_rtc_unlock(struct omap_rtc *rtc)
>> +{
>> + rtc_writel(rtc, OMAP_RTC_KICK0_REG, KICK0_VALUE);
>> + rtc_writel(rtc, OMAP_RTC_KICK1_REG, KICK1_VALUE);
>> +}
>> +
>> +static inline void am3352_rtc_lock(struct omap_rtc *rtc)
>> +{
>> + rtc_writel(rtc, OMAP_RTC_KICK0_REG, 0);
>> + rtc_writel(rtc, OMAP_RTC_KICK1_REG, 0);
>> +}
>> +
>> +static inline void default_rtc_unlock(struct omap_rtc *rtc)
>> +{
>> +}
>> +
>> +static inline void default_rtc_lock(struct omap_rtc *rtc)
>> +{
>> +}
>> +
>
> As they are called through a pointer, it is unnecessary to declare the
> functions as inlined, they will not be inlined anyway.

Thats true, thanks for pointing it.
Here is the updated patch.


-------8<--------------------------------