Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2771135imj; Mon, 11 Feb 2019 08:13:12 -0800 (PST) X-Google-Smtp-Source: AHgI3IanbR2UiVhFTBbHF75jjZTgcH95MfikIGdp3BVNrCTUSNHq78N4Ew4SZT+mPsfiYcIMgltz X-Received: by 2002:a17:902:2966:: with SMTP id g93mr21151483plb.11.1549901592263; Mon, 11 Feb 2019 08:13:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901592; cv=none; d=google.com; s=arc-20160816; b=pYezFUR7dIJKABMgsL0ARE3bjW5GLAedNqeN+OzAg2oqTXIzekOoAfx0bANzVUcDlV yTGxEycMklOmfIcjYp84Hths4kdFc1M6kjD96k8En0GLmTN6TWWutp4VWm8rlxXcuEPO 3WYG/VOu+8rTlunGYklBvfnt8qYOiyXVdaR3oBNHRv6ePXWmByT1WdZikmpQ+UTXBEQz pPsozKAdDtfOMS7535qPCTJV4lShH2quKiwmO0xJp7/PbPDSnsfxFFXHMuYcdlfNkgVD 7ndpnlijCMYMLsLREKxe210lGh9xlsRVNNkY7kCXlEgw511wav4Ppuz8Aum9Jdk9ffQa W2Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B7c2nY7r1s+lT9yQQ7KoolnqSbNj7TTyopKASxwDr7A=; b=wXhX9whIMi2qn0/kkz5o1qbu7rhGTbG6GmMtj1AL5jW12rcte1Ai3ymgQg0ofakiA5 5ZBgWXRAKMou60wBemexxSQxLGWLgrxtUdjV7kUq8LTeTpTc9TxPpDjEDNsVqujIYtgq u6RSsIHFxSwTI2Iwn4DG8u+rdhD6kXNzqOX7f5VNAyghN1H0bnAq/iMc2QNhuVnjGGyE CIID9sIlx+qV434rPmzSzo28iCcWc67w5yTjfOnUulcVO1Im9lZYplmf7Juns3s9bHZ0 f2naYxPQPpPJfrN+blBBayeCiHEjxRBujfWHpSbvV5+eMdYwOC3sel0DZMgT/iFDfNXl AAlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l2Q70ib6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si2577405pfk.243.2019.02.11.08.12.49; Mon, 11 Feb 2019 08:13:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l2Q70ib6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729136AbfBKOYQ (ORCPT + 99 others); Mon, 11 Feb 2019 09:24:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:57386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727835AbfBKOYO (ORCPT ); Mon, 11 Feb 2019 09:24:14 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 39B3C214DA; Mon, 11 Feb 2019 14:24:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895053; bh=Mi37cdZTsuJepmvEeQNEdWYa2jgFa/LerzDtXJWxRkY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l2Q70ib6ZY5Ooi9upN8uhgQheM7K/89uaq45gAtybzfc/O5lqGAV3xwx5hwou9FpE b/SuAcAxf4AImx1PS/360E5gS1nVEVGWSA63Tecsmuq6ODz/++to/G0X5WM7nevS6s uY+TIHWMTXT89glFLhstoShZbeikBwumZARgYkiQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Blumenstingl , Jonathan Cameron , Sasha Levin Subject: [PATCH 4.20 074/352] iio: adc: meson-saradc: fix internal clock names Date: Mon, 11 Feb 2019 15:15:01 +0100 Message-Id: <20190211141850.772000673@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 50314f98b0ac468218e7c9af8c99f215a35436df ] Before this patch we are registering the internal clocks (for example on Meson8b, where the SAR ADC IP block implements the divider and gate clocks) with the following names: - /soc/cbus@c1100000/adc@8680#adc_div - /soc/cbus@c1100000/adc@8680#adc_en This is bad because the common clock framework uses the clock to create a directory in /clk. With such name, the directory creation (silently) fails and the debugfs entry ends up being created at the debugfs root. With this change, the new clock names are: - c1108680.adc#adc_div - c1108680.adc#adc_en This matches the clock naming scheme used in the PWM, Ethernet and MMC drivers. It also fixes the problem with debugfs. The idea is shamelessly taken from commit b96e9eb62841c5 ("pwm: meson: Fix mux clock names"). Fixes: 3921db46a8c5bc ("iio: Convert to using %pOF instead of full_name") Signed-off-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/iio/adc/meson_saradc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index 672a5dee4a9d..ba4b42429a2a 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -587,8 +587,8 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev, struct clk_init_data init; const char *clk_parents[1]; - init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_div", - indio_dev->dev.of_node); + init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%s#adc_div", + dev_name(indio_dev->dev.parent)); if (!init.name) return -ENOMEM; @@ -609,8 +609,8 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev, if (WARN_ON(IS_ERR(priv->adc_div_clk))) return PTR_ERR(priv->adc_div_clk); - init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_en", - indio_dev->dev.of_node); + init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%s#adc_en", + dev_name(indio_dev->dev.parent)); if (!init.name) return -ENOMEM; -- 2.19.1