lkml.org 
[lkml]   [2010]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Resend [PATCH 3/4] MacbookAir3,1 and 3,2 hid support
On Tue, 26 Oct 2010, gimli wrote:

> This patch adds support for the new MacBookAir3,1 and 3,2 to the hid
> driver.
>
> Updated names names acording Apples kext.
>
> Signed-off-by: Edgar (gimli) Hucek <gimli@dark-green.com>

> - trans = apple_find_translation((hid->product < 0x21d ||
> + if(hid->product >= 0x023f && hid->product <= 0x0244 ) {
> + trans = apple_find_translation(macbookair_fn_keys, usage->code);
> + } else {
> + trans = apple_find_translation((hid->product < 0x21d ||
> hid->product >= 0x300) ?
> powerbook_fn_keys : apple_fn_keys,
> usage->code);

Could you please make this nicer? Having if and ternary operator both
there to chose the translation table looks really confusing.

Thanks,

--
Jiri Kosina
SUSE Labs, Novell Inc.


\
 
 \ /
  Last update: 2010-11-03 14:23    [W:0.152 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site