Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755337Ab0KCOZh (ORCPT ); Wed, 3 Nov 2010 10:25:37 -0400 Received: from mognix.dark-green.com ([88.116.226.179]:65073 "EHLO mognix.dark-green.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752583Ab0KCOZg (ORCPT ); Wed, 3 Nov 2010 10:25:36 -0400 MIME-Version: 1.0 Date: Wed, 03 Nov 2010 15:25:28 +0100 From: gimli To: Jiri Kosina Cc: Subject: Re: Resend [PATCH 3/4] MacbookAir3,1 and 3,2 hid support In-Reply-To: References: <66c1cd33ff5b2d908b2b31defb8e0cd1@mognix.dark-green.com> <3e6b335b371a07cd60221a25c5b6b47d@mognix.dark-green.com> <7b3b313ce7138c19191295a645dfb38f@mognix.dark-green.com> Message-ID: User-Agent: RoundCube Webmail/0.2.2 Content-Type: multipart/mixed; boundary="=_03fb90f6757ccfb8da56d0982336b31f" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9601 Lines: 152 --=_03fb90f6757ccfb8da56d0982336b31f Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="UTF-8" Next try. On Wed, 3 Nov 2010 09:56:21 -0400 (EDT), Jiri Kosina wrote: > On Wed, 3 Nov 2010, gimli wrote: > >> Does this look better ? > > What I would actually prefer would be something like > > > if ( ... ) > table = macbookair_fn_keys; > else if ( ... ) > table = powerbook_fn_keys; > else > table = apple_fn_keys; > > apple_find_translation(table, usage->code); > >> I also use the USB id's for the if. > > Thanks, --=_03fb90f6757ccfb8da56d0982336b31f Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="UTF-8"; name="hid_macbookair_2.patch"; Content-Disposition: attachment; filename="hid_macbookair_2.patch"; ZGlmZiAtdU5yIGxpbnV4LTIuNi4zNy1yYzEvZHJpdmVycy9oaWQvaGlkLWFwcGxlLmMgbGludXgt Mi42LjM3LXJjMS1NYWNCb29rQWlyL2Ry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M2CiAjZGVmaW5lIFVTQl9ERVZJQ0VfSURfQVBQTEVfV0VMTFNQUklORzNfSVNP CTB4MDIzNwogI2RlZmluZSBVU0JfREVWSUNFX0lEX0FQUExFX1dFTExTUFJJTkczX0pJUwkweDAy MzgKKyNkZWZpbmUgVVNCX0RFVklDRV9JRF9BUFBMRV9XRUxMU1BSSU5HNF9BTlNJCTB4MDIzZgor I2RlZmluZSBVU0JfREVWSUNFX0lEX0FQUExFX1dFTExTUFJJTkc0X0lTTwkweDAyNDAKKyNkZWZp bmUgVVNCX0RFVklDRV9JRF9BUFBMRV9XRUxMU1BSSU5HNF9KSVMJMHgwMjQxCisjZGVmaW5lIFVT Ql9ERVZJQ0VfSURfQVBQTEVfV0VMTFNQUklORzRBX0FOU0kJMHgwMjQyCisjZGVmaW5lIFVTQl9E RVZJQ0VfSURfQVBQTEVfV0VMTFNQUklORzRBX0lTTwkweDAyNDMKKyNkZWZpbmUgVVNCX0RFVklD RV9JRF9BUFBMRV9XRUxMU1BSSU5HNEFfSklTCTB4MDI0NAogI2RlZmluZSBVU0JfREVWSUNFX0lE X0FQUExFX0FMVV9XSVJFTEVTU18yMDA5X0FOU0kgIDB4MDIzOQogI2RlZmluZSBVU0JfREVWSUNF X0lEX0FQUExFX0FMVV9XSVJFTEVTU18yMDA5X0lTTyAgIDB4MDIzYQogI2RlZmluZSBVU0JfREVW SUNFX0lEX0FQUExFX0FMVV9XSVJFTEVTU18yMDA5X0pJUyAgIDB4MDIzYgo= --=_03fb90f6757ccfb8da56d0982336b31f-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/