From patchwork Wed Sep 13 12:17:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J, KEERTHY" X-Patchwork-Id: 9951331 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 BE18A6024A for ; Wed, 13 Sep 2017 12:18:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF69B28C22 for ; Wed, 13 Sep 2017 12:18:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3F0028ED1; Wed, 13 Sep 2017 12:18:23 +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_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 31CF928C22 for ; Wed, 13 Sep 2017 12:18:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751173AbdIMMSV (ORCPT ); Wed, 13 Sep 2017 08:18:21 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:43750 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbdIMMSV (ORCPT ); Wed, 13 Sep 2017 08:18:21 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v8DCHht4016332; Wed, 13 Sep 2017 07:17:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1505305063; bh=LtFAcM9gU4vldKxXsKc7zKoxPZsuajPdX4NbFY9zVKg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=NEFD7W8M6OVVVoCL+5NLszkVj7aDsZLbkhfLXmO0RmBLDNlz7wSOBkGgCUYdblvao vrg66k/2uX2CqqxaT/cnp25EAhU8COUvzn6GG2F4Gmv8P9vlCCrqvNv66OkTSAt9pP i1aLVhdXlr7gdoNsOJN9cA0VUyMeKUXG/W2HX1Lg= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8DCHc5i001891; Wed, 13 Sep 2017 07:17:38 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Wed, 13 Sep 2017 07:17:37 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Wed, 13 Sep 2017 07:17:37 -0500 Received: from ula0393675.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8DCHUoF011838; Wed, 13 Sep 2017 07:17:35 -0500 From: Keerthy To: CC: , , , Subject: [PATCH 2/2] mfd: tps65218: Introduce dependency on CONFIG_OF Date: Wed, 13 Sep 2017 17:47:10 +0530 Message-ID: <1505305030-13263-2-git-send-email-j-keerthy@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505305030-13263-1-git-send-email-j-keerthy@ti.com> References: <1505305030-13263-1-git-send-email-j-keerthy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the driver boots only via device tree hence add a dependency on CONFIG_OF. This leaves with a bunch of unused code so clean that up. Signed-off-by: Keerthy --- drivers/mfd/Kconfig | 2 +- drivers/mfd/tps65218.c | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 44c529e..682336d 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1400,7 +1400,7 @@ config MFD_TI_LP87565 config MFD_TPS65218 tristate "TI TPS65218 Power Management chips" - depends on I2C + depends on I2C && OF select MFD_CORE select REGMAP_I2C select REGMAP_IRQ diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c index 13834a0..910f569 100644 --- a/drivers/mfd/tps65218.c +++ b/drivers/mfd/tps65218.c @@ -215,17 +215,9 @@ static int tps65218_probe(struct i2c_client *client, const struct i2c_device_id *ids) { struct tps65218 *tps; - const struct of_device_id *match; int ret; unsigned int chipid; - match = of_match_device(of_tps65218_match_table, &client->dev); - if (!match) { - dev_err(&client->dev, - "Failed to find matching dt id\n"); - return -EINVAL; - } - tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); if (!tps) return -ENOMEM;