From patchwork Tue Aug 21 10:41:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Klauser X-Patchwork-Id: 1354001 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 0DCC8DFF0F for ; Tue, 21 Aug 2012 10:50:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756355Ab2HUKuP (ORCPT ); Tue, 21 Aug 2012 06:50:15 -0400 Received: from mx1.zhaw.ch ([160.85.104.50]:44576 "EHLO mx1.zhaw.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756701Ab2HUKuJ (ORCPT ); Tue, 21 Aug 2012 06:50:09 -0400 X-Greylist: delayed 500 seconds by postgrey-1.27 at vger.kernel.org; Tue, 21 Aug 2012 06:50:09 EDT Received: from mx1.zhaw.ch (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 26D6CAB6; Tue, 21 Aug 2012 12:41:47 +0200 (CEST) Received: from fermion.zhaw.ch (inst-232.20.zhaw.ch [160.85.232.20]) by mx1.zhaw.ch (Postfix) with ESMTP id D02B0607; Tue, 21 Aug 2012 12:41:46 +0200 (CEST) From: Tobias Klauser To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, devicetree-discuss@lists.ozlabs.org Subject: [PATCH 1/2] input: samsung-keypad: Use of_match_ptr() Date: Tue, 21 Aug 2012 12:41:46 +0200 Message-Id: <1345545706-27420-1-git-send-email-tklauser@distanz.ch> X-Mailer: git-send-email 1.7.5.4 X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.8.21.103016 X-PerlMx-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1100_1199 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __URI_NS ' Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Instead of having to define the match table to NULL if CONFIG_OF isn't set, use the of_match_ptr() macro which will do this for us. Signed-off-by: Tobias Klauser --- drivers/input/keyboard/samsung-keypad.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c index a061ba6..e2f31c8 100644 --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c @@ -662,8 +662,6 @@ static const struct of_device_id samsung_keypad_dt_match[] = { {}, }; MODULE_DEVICE_TABLE(of, samsung_keypad_dt_match); -#else -#define samsung_keypad_dt_match NULL #endif static struct platform_device_id samsung_keypad_driver_ids[] = { @@ -684,7 +682,7 @@ static struct platform_driver samsung_keypad_driver = { .driver = { .name = "samsung-keypad", .owner = THIS_MODULE, - .of_match_table = samsung_keypad_dt_match, + .of_match_table = of_match_ptr(samsung_keypad_dt_match), .pm = &samsung_keypad_pm_ops, }, .id_table = samsung_keypad_driver_ids,