Bug in keyboard driver
Diego Fdez. Durán
diego at goedi.net
Thu May 8 12:46:22 CEST 2008
On Thu, May 8, 2008 12:20, Alan Cox wrote:
> On Thu, 8 May 2008 10:00:57 +0200 (CEST)
> "Diego Fdez. Durán" <diego at goedi.net> wrote:
>
>>
>> On Thu, May 8, 2008 09:08, Sean McNeil wrote:
>> > the KEY_PHONE is backwards. It returns up when pushed and down when
>> > released. The following change fixes it:
>> >
>> > static irqreturn_t neo1973kbd_aux_irq(int irq, void *dev_id)
>> > {
>> > struct neo1973kbd *neo1973kbd_data = dev_id;
>> >
>> > - int key_pressed = !gpio_get_value(irq_to_gpio(irq));
>> > + int key_pressed = !!gpio_get_value(irq_to_gpio(irq));
>>
>> Pardon my ignorance, but... double negative? It wouldn't be better:
>
> !! isn't just a double negative in C - its a conversion from integer to
> true/false boolean value.
>
> Alan
>
Ouch! Learned! :) Thanks!
--
Diego Fdez. Durán <diego at goedi.net> | http://www.goedi.net
GPG : 925C 9A21 7A11 3B13 6E43 50DB F579 D119 90D2 66BB
More information about the openmoko-kernel
mailing list