From patchwork Mon Apr 9 08:45:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 10330807 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 976246053B for ; Mon, 9 Apr 2018 08:45:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F42A28415 for ; Mon, 9 Apr 2018 08:45:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7270C284D1; Mon, 9 Apr 2018 08:45:38 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, 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 36FCC28415 for ; Mon, 9 Apr 2018 08:45:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751416AbeDIIpf (ORCPT ); Mon, 9 Apr 2018 04:45:35 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:56403 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbeDIIpe (ORCPT ); Mon, 9 Apr 2018 04:45:34 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w398jLMX000690; Mon, 9 Apr 2018 03:45:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1523263521; bh=qhLsvxUvv1keYTxj+H0Z6BJwh8uEqovq2SKg9a6usAI=; h=From:To:CC:Subject:Date; b=mNgMbcbFajMWT5GyVqSkY04sQHCiqe7/+Ft6EIDumlVQmBFHguThvyeOe+mv65a/Z uOZri5McQzVmDl7vLtOsWEcFZs/RbpwbSR9sCkVx8ddo8wNkGbTeOcO4Agn4H89742 qYs3nYw7emkegXa5+GU120n8kgh1RsB+ziFDcjIg= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w398jLQq019209; Mon, 9 Apr 2018 03:45:21 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 9 Apr 2018 03:45:21 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 9 Apr 2018 03:45:21 -0500 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w398jIUs011441; Mon, 9 Apr 2018 03:45:19 -0500 From: Peter Ujfalusi To: , CC: , , , Subject: [PATCH v2] mfd: twl-core: Fix clock initialization Date: Mon, 9 Apr 2018 11:45:39 +0300 Message-ID: <20180409084539.14365-1-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.17.0 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 When looking up the clock we must use the client->dev as device since that is the one which is probed via DT. Signed-off-by: Peter Ujfalusi Cc: stable@vger.kernel.org # 4.16+ --- Hi, Changes since v1: - Removed the Fixes line and add tag only for v4.16 to avoid possible breakage in pre v4.16. Regards, Peter drivers/mfd/twl-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index d3133a371e27..c649344fd7f2 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -1177,7 +1177,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id) twl_priv->ready = true; /* setup clock framework */ - clocks_init(&pdev->dev, pdata ? pdata->clock : NULL); + clocks_init(&client->dev, pdata ? pdata->clock : NULL); /* read TWL IDCODE Register */ if (twl_class_is_4030()) {