From patchwork Tue Jul 18 21:43:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 9849697 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 353EB60392 for ; Tue, 18 Jul 2017 21:49:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E9DC285F7 for ; Tue, 18 Jul 2017 21:49:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13AB4285FD; Tue, 18 Jul 2017 21:49:14 +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=-1.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6773D285F7 for ; Tue, 18 Jul 2017 21:49:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=liY/wTzyejiiRD2lD4Qd+LsXwzCQhDcKiSr4SWtEASY=; b=XaW D/YYx2aKGKNoACpOsxtT9PORYyPMz64Yu7qbJRUPtypW/gTjb2h0+4lSdf/Fg0bEdzKofzoFq/oVC QCLhRrwmj2HonD7sRxMTyf7FI0DvSynM3dPstGpuSX5RmVGQuLmyYF2pD4oxh7tzUEHre2O3n4MYk q/0kqgkWPiUOcTybQ4Uq5qeA/D46Vb0ucooW6XxIhlp8rkK/MagSnFiQQg15CJugrWUg9V6tz6bTy FSZiHXPdU9khGbHoVo8Ppsp76rPm+dXfLxxY9FfKLUhmTDncwJG2LDRiv5aRlwaeI/XydwR3wWAv/ qDuxWg0Rk9gN+q47nvyjnsWfOWhdZ6Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXaMg-0006zT-W0; Tue, 18 Jul 2017 21:49:11 +0000 Received: from mail-pg0-f68.google.com ([74.125.83.68]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXaIT-0002DH-Le; Tue, 18 Jul 2017 21:45:13 +0000 Received: by mail-pg0-f68.google.com with SMTP id v190so4353603pgv.1; Tue, 18 Jul 2017 14:44:29 -0700 (PDT) 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=0f4nPP5LrGmRU0iXMP69zrcCUABrMRHZ9qE9E6zb3/g=; b=OpOjFJnrFLO93RHxijSt80ktUjtKzc+67e2bZc/GGOUKQXerB3acvkGd4/lvwz4p+C cfHAnT/EkfLZVkPUjc2YcepYt98YgUFpcj6iBL2lGUB/Ll3chqYkDTdqA2TFSHgiS8Wi MpRVClZ4Rfq5wOw0asirL8h+/ELGMIGi9hz6CU5pmbTmq3Rm73IPdzmwH7tOByccIsdw Zbc8P1vsV7/N0BCOqAP1NPMznqH2odRVf2AdSG8jbzOir9BoQIRxyVPCuvJm0k+BdoeY rO2A5Eu0u0+AstaTQya0DvLWxjB6/f9OdHwY3ZwY0JfNNtPtbBEMHcwMEzvybxzPgxf7 4oJw== X-Gm-Message-State: AIVw112HM1Ee7GpPN1vQJsTrkWbPsUNCJ7JrQuO6mFkZsbtMDwml8okf EVB4xCe8q8OtuA== X-Received: by 10.98.24.21 with SMTP id 21mr1022494pfy.190.1500414268557; Tue, 18 Jul 2017 14:44:28 -0700 (PDT) Received: from localhost.localdomain (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.googlemail.com with ESMTPSA id r207sm7186560pfr.106.2017.07.18.14.44.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 14:44:27 -0700 (PDT) From: Rob Herring To: Jonathan Cameron Subject: [PATCH] iio: Convert to using %pOF instead of full_name Date: Tue, 18 Jul 2017 16:43:08 -0500 Message-Id: <20170718214339.7774-28-robh@kernel.org> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170718_144450_166245_7AD75A92 X-CRM114-Status: GOOD ( 11.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Lars-Peter Clausen , linux-iio@vger.kernel.org, Kevin Hilman , linux-kernel@vger.kernel.org, Peter Meerwald-Stadler , Hartmut Knaack , Carlo Caione , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Carlo Caione Cc: Kevin Hilman Cc: linux-iio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org --- drivers/iio/adc/max9611.c | 4 ++-- drivers/iio/adc/meson_saradc.c | 8 ++++---- drivers/iio/adc/ti-ads1015.c | 16 ++++++++-------- drivers/iio/inkern.c | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) -- 2.11.0 diff --git a/drivers/iio/adc/max9611.c b/drivers/iio/adc/max9611.c index b0526e4b9530..b1dd17cbce58 100644 --- a/drivers/iio/adc/max9611.c +++ b/drivers/iio/adc/max9611.c @@ -549,8 +549,8 @@ static int max9611_probe(struct i2c_client *client, ret = of_property_read_u32(of_node, shunt_res_prop, &of_shunt); if (ret) { dev_err(&client->dev, - "Missing %s property for %s node\n", - shunt_res_prop, of_node->full_name); + "Missing %s property for %pOF node\n", + shunt_res_prop, of_node); return ret; } max9611->shunt_resistor_uohm = of_shunt; diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index 83da50ed73ab..9dffbb3bf62f 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -572,8 +572,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, "%s#adc_div", - of_node_full_name(indio_dev->dev.of_node)); + init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_div", + indio_dev->dev.of_node); init.flags = 0; init.ops = &clk_divider_ops; clk_parents[0] = __clk_get_name(priv->clkin); @@ -591,8 +591,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, "%s#adc_en", - of_node_full_name(indio_dev->dev.of_node)); + init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_en", + indio_dev->dev.of_node); init.flags = CLK_SET_RATE_PARENT; init.ops = &clk_gate_ops; clk_parents[0] = __clk_get_name(priv->adc_div_clk); diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c index 884b8e461b17..7972845b3823 100644 --- a/drivers/iio/adc/ti-ads1015.c +++ b/drivers/iio/adc/ti-ads1015.c @@ -505,24 +505,24 @@ static int ads1015_get_channels_config_of(struct i2c_client *client) unsigned int data_rate = ADS1015_DEFAULT_DATA_RATE; if (of_property_read_u32(node, "reg", &pval)) { - dev_err(&client->dev, "invalid reg on %s\n", - node->full_name); + dev_err(&client->dev, "invalid reg on %pOF\n", + node); continue; } channel = pval; if (channel >= ADS1015_CHANNELS) { dev_err(&client->dev, - "invalid channel index %d on %s\n", - channel, node->full_name); + "invalid channel index %d on %pOF\n", + channel, node); continue; } if (!of_property_read_u32(node, "ti,gain", &pval)) { pga = pval; if (pga > 6) { - dev_err(&client->dev, "invalid gain on %s\n", - node->full_name); + dev_err(&client->dev, "invalid gain on %pOF\n", + node); of_node_put(node); return -EINVAL; } @@ -532,8 +532,8 @@ static int ads1015_get_channels_config_of(struct i2c_client *client) data_rate = pval; if (data_rate > 7) { dev_err(&client->dev, - "invalid data_rate on %s\n", - node->full_name); + "invalid data_rate on %pOF\n", + node); of_node_put(node); return -EINVAL; } diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index da3d06b073bb..617372cc73e6 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c @@ -205,8 +205,8 @@ static struct iio_channel *of_iio_channel_get_by_name(struct device_node *np, if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER) break; else if (name && index >= 0) { - pr_err("ERROR: could not get IIO channel %s:%s(%i)\n", - np->full_name, name ? name : "", index); + pr_err("ERROR: could not get IIO channel %pOF:%s(%i)\n", + np, name ? name : "", index); return NULL; }