From patchwork Sat Jan 21 19:20:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 9530643 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 CC1DB600CA for ; Sat, 21 Jan 2017 19:29:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDFAC28448 for ; Sat, 21 Jan 2017 19:29:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1C6F28449; Sat, 21 Jan 2017 19:29:31 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 57C252843E for ; Sat, 21 Jan 2017 19:29:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751055AbdAUT3T (ORCPT ); Sat, 21 Jan 2017 14:29:19 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:35506 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750938AbdAUT3R (ORCPT ); Sat, 21 Jan 2017 14:29:17 -0500 Received: by mail-qk0-f194.google.com with SMTP id u25so5923143qki.2; Sat, 21 Jan 2017 11:29:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TQtt5IcSRn80h4d4cHAwmNckrEgbVrN+eSjqEXQUzZY=; b=BpoxQXcOn007+gko/hT3bz9etWhOx8bZTvl6MQjY27XFkb4/JQrh3OoxsvCRntYcyN 0L8zgO49ejYpbb3BCKtRRrhTFtngln1I69FlnGjND82n5+V66gASoN5LOjxvtm0XSWeB s73kjZQZJN8OOVmmtJjkHw0Pv5tdwChwxgCq/XamMo4zLwAmgPr/1ZZf4kBq93V6PxHI yixIiv8oDr9efuERihOPnKwUz75G9QsaioP3RGnDJwKMLq3P/KWT0zcHeG7Bk5TznRQO cTbnbwAtoaDE1k0G23di0fIYdOKjvt7GmNCRnbeRRu79ymhXZEVc60KLI6lnZ3TtuWvl 3dPw== 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:in-reply-to :references; bh=TQtt5IcSRn80h4d4cHAwmNckrEgbVrN+eSjqEXQUzZY=; b=W7VX09pWZUuyofTQMHeRTKJfl2Gj0y+EfhlVqeLlayYRuRYPW41N4YYpSkBljojttD L12B7vb3UPJkdtOIOCEIpsjEyNjAfjyOWO9Mqidbke02qreflOtWWJVU9Cai3pw9eb4T zv019lf2MeASwRUs2vwxNm9U6jwT6cXmWEBWJa66TIg1OKOYeuNo1y651swjiaxdcwWX zH3VUcKRw2Kx2fy4rXL0lik6mzGhG0q4ct/RPdqRw3qKFFrcb9uEtOdJoP0Px2ub+ecS fZo0n/Hb0BYm+Bj96QtIWiYcmDYcI8DHhjWY1MyO5zVcVWH94Pgwukt9yBminFBPpcbt 5CKA== X-Gm-Message-State: AIkVDXKs0pt6d/DOlosTB/o/eEb9VPqeftFetbBOe14sK+hld+g+HB5afRxA42TiP4MrHg== X-Received: by 10.55.185.70 with SMTP id j67mr7986062qkf.4.1485026428248; Sat, 21 Jan 2017 11:20:28 -0800 (PST) Received: from fainelli-laptop.vpn.broadcom.net ([2601:1c2:1701:4377:c1bf:596d:f44e:5a90]) by smtp.gmail.com with ESMTPSA id k19sm5756587qtf.37.2017.01.21.11.20.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jan 2017 11:20:27 -0800 (PST) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Rob Herring , Mark Rutland , Jean Delvare , Guenter Roeck , Jonathan Corbet , 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 Message-Id: <20170121192010.30681-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170121192010.30681-1-f.fainelli@gmail.com> References: <20170121192010.30681-1-f.fainelli@gmail.com> 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 We have a device reference, utilize it instead of pr_warn(). Signed-off-by: Florian Fainelli --- 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];