From patchwork Thu Mar 9 00:54:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingkui Wang X-Patchwork-Id: 9612249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B6AB6016C for ; Thu, 9 Mar 2017 02:42:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 806BE28610 for ; Thu, 9 Mar 2017 02:42:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 744092861C; Thu, 9 Mar 2017 02:42:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2242D28610 for ; Thu, 9 Mar 2017 02:42:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751009AbdCICmi (ORCPT ); Wed, 8 Mar 2017 21:42:38 -0500 Received: from mail-io0-f173.google.com ([209.85.223.173]:35197 "EHLO mail-io0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750739AbdCICmi (ORCPT ); Wed, 8 Mar 2017 21:42:38 -0500 Received: by mail-io0-f173.google.com with SMTP id z13so20263410iof.2 for ; Wed, 08 Mar 2017 18:42:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=y4mRusmpwyY33eoC25IEAszw7v5NN/GVwgTEItrpH2U=; b=Wr2hE1H9FWOV/7Xbq9VQsvW+Q2XzHidOAAckD2n0z/+ZeUGBFYlZJjiXFZKLQ6O59b NTd8/mL+em6HpyD+PjufYpZb4VBaxl+Q/4gRfYv58sSIH2gbvaSmrR1XtfjyLRPT3+5c OWkoU6oeeSzPOLzu6xO9icbF0tuXF9R9b85n+voDJiHWGOCzzC2fhjfJrtDZ9jLDVbEh TunYjP1QezdWS0LAyUs89PgQARwXfNdM6xzRi8ju+Y7AXI4aGyuRJe7u/lsQ8ovXMaZ7 8jfA97upCqEaZ0yqibUW4f1f+kK+GPxr9I3T6XWqX6jRLJwXNYuiSAnOfGY8QFIXnWfv OmQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=y4mRusmpwyY33eoC25IEAszw7v5NN/GVwgTEItrpH2U=; b=eeFYO90p41MAYB8SyH4PEIpEdPErMseKKNGWq+qoBmFD6r//HMnGYTksd67v1PfrNi +J0+kqOrE1ISjCgPJPbx9GOMA+it/DeUFf+7mQ3jz1iwLmD9pGeJNcfZpqahlD/aJiwi r8gh0VsLeBaedtbQQSrKAsGybPU5/+o5WdxohcauXUlrun35Xg1BQiRCwDz+ZWptFOvp wb5LIH139OZ+93Hqqjq781h4PVJyiVbE77kKC8U7p5j7kpvVAygsm/7JGIxz8xGRmomS eIV9Ovz/rBi75eyhmXspjVS9Xr8sHoj1DBeGVGSL1M55rL6e9EvSo0LMTrLcQbJ1X/KQ aVrA== X-Gm-Message-State: AMke39nWWDtVsRpW11Q9HU94VU21BYGbaG0LX20wC9prX61baQ/6RZmJ9pNOvFy96GDdNuKz9veV00tRsHijvwYj X-Received: by 10.107.143.3 with SMTP id r3mr8985683iod.187.1489020843297; Wed, 08 Mar 2017 16:54:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.153.132 with HTTP; Wed, 8 Mar 2017 16:54:02 -0800 (PST) From: Jingkui Wang Date: Wed, 8 Mar 2017 16:54:02 -0800 Message-ID: Subject: [PATCH] drivers: Remove OF dependency in drv260x driver To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Dan Murphy , linux-kernel@vger.kernel.org Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As the driver is using generic device properties, it should work properly when CONFIG_OF is turned off. This patch removes the ifdef CONFIGOF and make sure the driver always have of_match_table. Signed-off-by: Jingkui Wang --- drivers/input/misc/drv260x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c index fb089d3..17eb84a 100644 --- a/drivers/input/misc/drv260x.c +++ b/drivers/input/misc/drv260x.c @@ -652,7 +652,6 @@ static const struct i2c_device_id drv260x_id[] = { }; MODULE_DEVICE_TABLE(i2c, drv260x_id); -#ifdef CONFIG_OF static const struct of_device_id drv260x_of_match[] = { { .compatible = "ti,drv2604", }, { .compatible = "ti,drv2604l", }, @@ -661,13 +660,12 @@ static const struct of_device_id drv260x_of_match[] = { { } }; MODULE_DEVICE_TABLE(of, drv260x_of_match); -#endif static struct i2c_driver drv260x_driver = { .probe = drv260x_probe, .driver = { .name = "drv260x-haptics", - .of_match_table = of_match_ptr(drv260x_of_match), + .of_match_table = drv260x_of_match, .pm = &drv260x_pm_ops, }, .id_table = drv260x_id,