From patchwork Wed Nov 14 16:48:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 1742881 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id ED697DF264 for ; Wed, 14 Nov 2012 16:49:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423115Ab2KNQsR (ORCPT ); Wed, 14 Nov 2012 11:48:17 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:43345 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423100Ab2KNQsP (ORCPT ); Wed, 14 Nov 2012 11:48:15 -0500 Received: by mail-pa0-f46.google.com with SMTP id hz1so409408pad.19 for ; Wed, 14 Nov 2012 08:48:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=mjTmZGN063KppBj15YdrOBvo3ata2i5bOVzA2Msk+68=; b=Vs9mju4RjaU8hzRc8KTnWnE14D1rbsMVEjcQQ/l8cqXqlNf9VeorXmYGUT6554E8E9 uCDK8TT125hXKuLnrKkCLFeIU4keMGUabg6oqGsii6sGYxLaga2ph1PvRKF2ZsoFXQ2d ycBcaiVhNECcmezEMI49VJXrLI6Vb5CSdVBTmDb+qNkPwJYuA9xR4F70E7i1LY483YK5 dYc2SdEljxiDdISOh5gv7HOq/7/rAjn3J1XccpBGBckcKgUUiUNy8C9ybe97o+GEWhkD RLkOU9QIx5YJ+sO7Qr3pF1irQgz63iNTSWidN0rDfRGJ9hF5g9zuqOJf4BYA0c7c458b 72pw== Received: by 10.68.137.198 with SMTP id qk6mr79720605pbb.60.1352911695661; Wed, 14 Nov 2012 08:48:15 -0800 (PST) Received: from mailhub.coreip.homeip.net (c-67-188-112-76.hsd1.ca.comcast.net. [67.188.112.76]) by mx.google.com with ESMTPS id ok8sm7977909pbb.42.2012.11.14.08.48.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Nov 2012 08:48:14 -0800 (PST) From: Dmitry Torokhov To: Alban Bedel Cc: linux-input@vger.kernel.org Subject: [PATCH 3/5] Input: tca8418_keypad - move device ID tables closer to where they are used Date: Wed, 14 Nov 2012 08:48:06 -0800 Message-Id: <1352911688-5001-3-git-send-email-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1352911688-5001-1-git-send-email-dmitry.torokhov@gmail.com> References: <1352911688-5001-1-git-send-email-dmitry.torokhov@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This matches structure of most other input drivers. Signed-off-by: Dmitry Torokhov Reviewed-by: Alban Bedel --- drivers/input/keyboard/tca8418_keypad.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index 7f2869f..35340c3 100644 --- a/drivers/input/keyboard/tca8418_keypad.c +++ b/drivers/input/keyboard/tca8418_keypad.c @@ -110,21 +110,6 @@ #define KEY_EVENT_CODE 0x7f #define KEY_EVENT_VALUE 0x80 - -static const struct i2c_device_id tca8418_id[] = { - { TCA8418_NAME, 8418, }, - { } -}; -MODULE_DEVICE_TABLE(i2c, tca8418_id); - -#ifdef CONFIG_OF -static const struct of_device_id tca8418_dt_ids[] __devinitconst = { - { .compatible = "ti,tca8418", }, - { } -}; -MODULE_DEVICE_TABLE(of, tca8418_dt_ids); -#endif - struct tca8418_keypad { unsigned int irq; unsigned int row_shift; @@ -419,6 +404,20 @@ static int __devexit tca8418_keypad_remove(struct i2c_client *client) return 0; } +static const struct i2c_device_id tca8418_id[] = { + { TCA8418_NAME, 8418, }, + { } +}; +MODULE_DEVICE_TABLE(i2c, tca8418_id); + +#ifdef CONFIG_OF +static const struct of_device_id tca8418_dt_ids[] __devinitconst = { + { .compatible = "ti,tca8418", }, + { } +}; +MODULE_DEVICE_TABLE(of, tca8418_dt_ids); +#endif + static struct i2c_driver tca8418_keypad_driver = { .driver = { .name = TCA8418_NAME,