From patchwork Tue Jul 18 21:43:05 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: 9849605 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 A7470600CC for ; Tue, 18 Jul 2017 21:44:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 930A6285F7 for ; Tue, 18 Jul 2017 21:44:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87383285FE; Tue, 18 Jul 2017 21:44:29 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 A3AEB285F7 for ; Tue, 18 Jul 2017 21:44:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752721AbdGRVo1 (ORCPT ); Tue, 18 Jul 2017 17:44:27 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:32932 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752712AbdGRVoX (ORCPT ); Tue, 18 Jul 2017 17:44:23 -0400 Received: by mail-pg0-f67.google.com with SMTP id z1so4352430pgs.0; Tue, 18 Jul 2017 14:44:23 -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=n2CKKbvF7O0c8UcDkD1u0FzHK3iYyLnhJd2InnnqiVI=; b=XXdXmCPNhAbH4Hjo3K1Mzp9qvaZZRAHbdlk/W/KtBn/4rDeUNqUID2X/Xc0UuFmT5i QZIALrPio50DVCy+/hbK4GxG+xOenQpPcJ4yx77VTGsDvtnkwhVKiKM79f4KarTxJqM+ P5PfP+ehs1ve3u5KLo78pWISIse1y1AkOGec+wDw+IHWCh9YthOzww61fyQGTMKhGxpr ULYvpXyDDmVg6aL6WfIz5zG6wJogc/ClYPdhnfE2sMegy4i9fTXAsYs0Hkwhl//HHLH/ 7OtiTv3QDy/CcYDGm8H5eEnc0RfcQNrcNKbcyrSAJfGtNLttfHAvClKBENMg/P3Li1xT Q3Ww== X-Gm-Message-State: AIVw110Y2RXinuUmokevO2ygC002zdWKZgJkx8n9W3C5sD7LW2RS5OIY B3LjBgAGLo2vxQ== X-Received: by 10.99.8.66 with SMTP id 63mr3821152pgi.15.1500414263147; Tue, 18 Jul 2017 14:44:23 -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.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 14:44:22 -0700 (PDT) From: Rob Herring To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dirk Eibach , Jean Delvare , linux-hwmon@vger.kernel.org Subject: [PATCH] hwmon: Convert to using %pOF instead of full_name Date: Tue, 18 Jul 2017 16:43:05 -0500 Message-Id: <20170718214339.7774-25-robh@kernel.org> X-Mailer: git-send-email 2.11.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.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: Dirk Eibach Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org --- drivers/hwmon/ads1015.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/hwmon/ads1015.c b/drivers/hwmon/ads1015.c index 357b42607164..98c704d3366a 100644 --- a/drivers/hwmon/ads1015.c +++ b/drivers/hwmon/ads1015.c @@ -191,24 +191,23 @@ 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); return -EINVAL; } } @@ -217,8 +216,7 @@ 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); return -EINVAL; } }