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 \(Arm\)" X-Patchwork-Id: 108226 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp6488970qge; Tue, 18 Jul 2017 14:55:36 -0700 (PDT) X-Received: by 10.98.212.19 with SMTP id a19mr3754513pfh.131.1500414936164; Tue, 18 Jul 2017 14:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500414936; cv=none; d=google.com; s=arc-20160816; b=NNx+le9cYAtdGaKMj12vYxkyMy++MucqRueif3I6BCH5QM+uEsEw1jZHbE9wlZF0vk rpTosKwQ4Sbf28hdQV+I+1FX66kJO45uXK86gkDoRVruz816XObAIdDgQNAc5ZId34gL gSqjOPxai1AHzSqmHS3xHYydvrwI2cZiT5X8plQpyMsIqulalwzHjpLQ85KPK33lEcP5 EB8eh8NIJX7yxNGzt9meRzyCHwS3toyCRuLRk8SafS91aeeTkoNwSMnB3g07iF8l01Qp plfvBk5kJzJU5zflOP3LtALGTozvFc2hVRafEruFqbVvyW3shbbmkN/qljK2xWqSxHkW d35w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=0f4nPP5LrGmRU0iXMP69zrcCUABrMRHZ9qE9E6zb3/g=; b=Z4rG7kRu5X1fjOJf3UuzriixOiAWN1X0TSzl+OrPQLGh6qfh9KB9CKUKiNmWL/EQrp HFkradLKRB1+aJnyqoI9A/FEXpBeDpDtOjc7VwBHHdfZNHqbQwG6vDH1m9iO8fn8lm6w vLFbZF3kWQfQbLjS64Y0ZmF+9+S0FO7+fr8Vo0EC6KhOluuV/CmEtMV/kopy/ZIpIep1 Eo9i8/ajRMr5IMnYS1SUzeWJaIndTdexfRXxP7zoRsrgwkR75ZfXFg2s2iQzkDckozDL u8knW2Hb09j+idhc1IW2RmDeQ1L3Dopwgt023RpVAhUbLjfg5bvOm72yYAvBAQYf+148 4Xhw== ARC-Authentication-Results: i=1; mx.google.com; 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 y62si2572847plh.221.2017.07.18.14.55.35; Tue, 18 Jul 2017 14:55:36 -0700 (PDT) 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; 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 S1752951AbdGRVzd (ORCPT + 25 others); Tue, 18 Jul 2017 17:55:33 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:32954 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752734AbdGRVo3 (ORCPT ); Tue, 18 Jul 2017 17:44:29 -0400 Received: by mail-pg0-f67.google.com with SMTP id z1so4352596pgs.0; Tue, 18 Jul 2017 14:44:28 -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=Krm7U27LF6i7Jc6R6A5oTrYotfHeo5BDi+JjG3dyNok49LIWEScjNiYTn3ajHpV2J+ HFZ65eUWRh91pNdHrgqSRbHGf3iO7B5Kj/yTrxnOKW+NQkGJTz/j7SF9DvyY1rcT8qRn DJ9LNa9943rGvTvNrjOYRQWOsJ3F5WQUA5fOyJn+lKbn6jARTYImeOdtkNOBDpd/SBf8 YgWfzvRD++wDlgG0WPIbreOVTUy6/hDa9f+T4FS1LnVW09rUY12lG4qe+Wq45tIOX+x/ CtV4R4r2MkXY5fQzCT0ElPipdONStP3mKtEFnLN+XE+O8EqyBxirVKaWGXJ/6qvvigKU +hLg== X-Gm-Message-State: AIVw1122cW5A+8baSnugv5upTMhPe/2m0XqoUy3xvwVGW2Y3+7x3whcs GcW7LulYWmZoXA== 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 Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Carlo Caione , Kevin Hilman , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; }