From patchwork Thu Mar 9 01:24:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingkui Wang X-Patchwork-Id: 9612185 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 EC29760414 for ; Thu, 9 Mar 2017 01:33:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2BF428643 for ; Thu, 9 Mar 2017 01:33:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6FC428646; Thu, 9 Mar 2017 01:33:26 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, 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 B7B6728643 for ; Thu, 9 Mar 2017 01:33:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754780AbdCIBdY (ORCPT ); Wed, 8 Mar 2017 20:33:24 -0500 Received: from mail-pg0-f52.google.com ([74.125.83.52]:34968 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754781AbdCIBdS (ORCPT ); Wed, 8 Mar 2017 20:33:18 -0500 Received: by mail-pg0-f52.google.com with SMTP id b129so19783320pgc.2 for ; Wed, 08 Mar 2017 17:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=y4mRusmpwyY33eoC25IEAszw7v5NN/GVwgTEItrpH2U=; b=luPVl/6QhH8qRXnOW8pOBuNphMLbo8XrSry+gKCvc8+bMDb0VwWFDRCJPnM+fSxc+I PAdfxeDW+rtCTAB+vBfK155UNTALzKrQOcMOqnPnFiXyS1JKg2i3QWHHKjWYh9YC2N9p S2sSEhiHbrnRAvT60wV+5vVPauM9sGKR8S3In3aG7JGYM/EPVclbShz39Byh8B6T7Nc5 uNKBi2esy8POXpqSQrNGMNJcHu+RsmHB/rfGQm3mleOloQq6ZmLflHCryRR1J/IWOIa/ ctTE2dJrPI6nfAAdZ3q1gDvYSzdFSaASSrL+Omli/TuIgjob3SKNNAZKpI/RKeWqxpmg ufuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=y4mRusmpwyY33eoC25IEAszw7v5NN/GVwgTEItrpH2U=; b=do3tpEPqP5W4Ncoz+cUkJixcYMs8Rh6e6i1J+gp2uLKJk+LGp9MzhFHQs+JGRRObu1 /nDzQ7obWb3V4W3CmcMRzCPvs/eyXoJebRmoNIHjmpIFTjxptuz5CuOZOlEB2zWrgxkz WKc/n8n/V6JdTwB5pN4tYvNm0hCQgXnvtAe0jelLlzHATrxU108o+6mAXnt+c6cSQZQJ Do+CHldoHExqaTKHRc9CaG/UNK/3ZsYdQg2hA/f/qFz+4GJ7LYJXgf5J5yPhA/cClmme FeJ6ActLHFmhiYPO6KwId58GjuD0kfkkKuTuCU0PLwJuCVBpk3JSTPKIr8CDneuLTqPm r0Mw== X-Gm-Message-State: AMke39ni7/QHOysKY4FkCs6Tq05bjxkC+thDRzME0G57xpINlCu5IDSJ+bi7cy8gxwC+ZwzK X-Received: by 10.99.95.5 with SMTP id t5mr10634201pgb.27.1489022684315; Wed, 08 Mar 2017 17:24:44 -0800 (PST) Received: from jkwang0.mtv.corp.google.com ([2620:0:1000:1301:bc19:daae:f228:aeb6]) by smtp.gmail.com with ESMTPSA id y6sm8490286pgc.1.2017.03.08.17.24.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 17:24:43 -0800 (PST) From: Jingkui Wang To: linux-input@vger.kernel.org Cc: Jingkui Wang , dmitry.torokhov@gmail.com Subject: [PATCH] drivers: Remove OF dependency in drv260x driver Date: Wed, 8 Mar 2017 17:24:36 -0800 Message-Id: <1489022677-52409-1-git-send-email-jkwang@google.com> X-Mailer: git-send-email 2.6.6 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,