public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Jonathan Corbet <corbet@lwn.net>,
	devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
	FLATTENED DEVICE TREE BINDINGS),
	linux-hwmon@vger.kernel.org (open list:HARDWARE MONITORING),
	linux-doc@vger.kernel.org (open list:DOCUMENTATION)
Subject: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn
Date: Sat, 21 Jan 2017 11:20:09 -0800	[thread overview]
Message-ID: <20170121192010.30681-2-f.fainelli@gmail.com> (raw)
In-Reply-To: <20170121192010.30681-1-f.fainelli@gmail.com>

We have a device reference, utilize it instead of pr_warn().

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/hwmon/lm70.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
index d6ecd1a4be59..52c5cdd00448 100644
--- a/drivers/hwmon/lm70.c
+++ b/drivers/hwmon/lm70.c
@@ -72,7 +72,8 @@ static ssize_t temp1_input_show(struct device *dev,
 	 */
 	status = spi_write_then_read(spi, NULL, 0, &rxbuf[0], 2);
 	if (status < 0) {
-		pr_warn("spi_write_then_read failed with status %d\n", status);
+		dev_warn(dev, "spi_write_then_read failed with status %d\n",
+			 status);
 		goto out;
 	}
 	raw = (rxbuf[0] << 8) + rxbuf[1];
-- 
2.9.3

  reply	other threads:[~2017-01-21 19:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-21 19:20 [PATCH 0/2] hwmon: (lm70) Couple patches Florian Fainelli
2017-01-21 19:20 ` Florian Fainelli [this message]
2017-01-21 20:14   ` [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Guenter Roeck
2017-01-23  6:43   ` Joe Perches
2017-01-23  6:56     ` Joe Perches
2017-01-23 12:00       ` Julia Lawall
2017-01-23  7:01     ` Guenter Roeck
2017-01-23  7:18       ` Julia Lawall
2017-01-21 19:20 ` [PATCH 2/2] hwmon: (lm70) Add support for TI TMP122/124 Florian Fainelli
2017-01-21 20:25   ` Guenter Roeck
2017-01-21 23:11     ` Florian Fainelli
2017-01-22  0:01       ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170121192010.30681-2-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox