Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1564221
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn |
| Date | 2017-01-21 20:30 +0100 |
| Message-ID | <t29wl-7O2-9@gated-at.bofh.it> (permalink) |
| References | <t29wl-7O2-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Florian Fainelli <f.fainelli@gmail.com> - 2017-01-21 20:30 +0100
Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Guenter Roeck <linux@roeck-us.net> - 2017-01-21 21:20 +0100
Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Joe Perches <joe@perches.com> - 2017-01-23 07:50 +0100
Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Joe Perches <joe@perches.com> - 2017-01-23 08:00 +0100
Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Julia Lawall <julia.lawall@lip6.fr> - 2017-01-23 13:10 +0100
Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Guenter Roeck <linux@roeck-us.net> - 2017-01-23 08:10 +0100
Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Julia Lawall <julia.lawall@lip6.fr> - 2017-01-23 08:20 +0100
csiph-web