Stefan Schmidt escreveu:
> Hello.
> 
> On Sat, 2008-07-12 at 13:01, Antonio Ospite wrote:
>> On Wed, 09 Jul 2008 06:17:16 +0000
>> [EMAIL PROTECTED] wrote:
>>
>>> ++  int val = (bits == MMC_VDD_165_195) ? 6 : fls(bits) / 2 + 3;
>> Ok, the formula has been tested, and it works.
> 
> Great, thanks for testing it out.
> 
>> Just as a side-note, we have this call:
>> ezx_pcap_mmcsd_voltage((1 << vdd) & pdata->ocr_mask);
>> we shift here and then "unshift" the value with fls().
>> I don't know how much fls() costs, is it worth to avoid it?
>> If yes, I could make the needed changes.
> 
> It could be a left over as we used fls() already before Daniel made the 
> changes
> based on Eric comments. Daniel, your opinion on this?

        Shift left and just after shift right again seems stupid. Please
fix this.

> 
>> Ah, and is there a reason why we are not using msecs_to_jiffies() when
>> setting the detect_delay field in ezx_mci_platform_data? We have:
>>      .detect_delay = 150 / (1000/HZ),
> 
> Hmm, perhaps Daniel did just not know about it? Of course only a guess.

Eric Miao wrote:
> Why not just initialize this detect_delay within the ezx_mci_platform_data
> definition below? And thus avoid that static structure declaration above?

Using msecs_to_jiffies() on the declaration of ezx_mci_platform_data
leads to:
arch/arm/mach-pxa/ezx.c:199: error: initializer element is not constant
arch/arm/mach-pxa/ezx.c:199: error: (near initialization for 
‘ezx_mci_platform_data.detect_delay’)

To make this simple, i think we should simply use:

        .detect_delay = 15,


-- 
Daniel Ribeiro

Reply via email to