Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3148858imu; Sun, 11 Nov 2018 08:34:45 -0800 (PST) X-Google-Smtp-Source: AJdET5fqhPVAU5bg4gsArIghdnEIfUE7RMUzz+4M/HQDw187GQ68PbaKMuKIXDv/Jg1ioJS14EOm X-Received: by 2002:a63:f141:: with SMTP id o1mr14633459pgk.134.1541954085386; Sun, 11 Nov 2018 08:34:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541954085; cv=none; d=google.com; s=arc-20160816; b=0FEjlxulngaa8PEXU/Lpuhk9tQ2SbHDEoH0Ib0Gmj3gz1HWcndWgMJP8cC9UfZdUeb SOq305qLK3bIFIVdlZc6mG6CRyZDaFW9MnyF5ZFShFG0TorbSEuBsD0Sgnnd6ZYWEyh0 X+5IJx0nsRom8z0vTlqSy/obMI5IaXSOo5oQXt9HduJX00QqSllwvPcvmhorfDqqJE9z TfCkvuN8LrwDbY7ZibxAMfejGV4IkmENl0e748rb1XI/374uPkQL1zxT7jHuPXQ90nIM EIp/bq3Le2TCVfNFsaiusow45BJBQBP16+zJlWKrJPz2XkXhoXFFwuCPB17SXbG+j1aZ eyzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wWYLPQcHggiQSDqWdRca3YZneGsfrnXudHSsBiBkBIc=; b=D3pb8PfleKQMmHdUqSfBtLFgwja+dN/UVa88vRcluQc4OD9M87yGtAPiji+EwwvCXU 0gfXMeQ9FZAQaYaI43IhY0RopPKgFkQu60LObnScoayCBoaQdPkQFIMb0J2+baxrFnfv hNawlJdXUx5nUkd7CLlOLSc7VE8VDJn2fsqnKUbSBEn1b+S7Ir6Wx5zUihLpab/I6+ak dpJW6f+lT701p5hR7PeVMvVXvibCIdZDczr351GAa9BOlFF+wbVzfQgmyfn7gMpw1hwp Jh3ozT8h7Cb+G+vAHdsR5X5liW7kkZhmw2OEeYYA2HIkv6D/Pho2mSOAFaRgTjUgXuub QDEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Cd492yOG; 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 b4-v6si16129219pfa.25.2018.11.11.08.34.27; Sun, 11 Nov 2018 08:34:45 -0800 (PST) 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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Cd492yOG; 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 S1728621AbeKLCXE (ORCPT + 99 others); Sun, 11 Nov 2018 21:23:04 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:34023 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727817AbeKLCXE (ORCPT ); Sun, 11 Nov 2018 21:23:04 -0500 Received: by mail-pg1-f193.google.com with SMTP id 17so2682932pgg.1; Sun, 11 Nov 2018 08:34:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=wWYLPQcHggiQSDqWdRca3YZneGsfrnXudHSsBiBkBIc=; b=Cd492yOGZFFKfASkv/K8QxGW1jdlCRATOPUgxPIJjsw9eLiUbYp+lxA1TcTeB92n7t ySC77Yf6p7Cxv80HBcrrxy8SleA3s6ap7yXs3S7YE9W2rIDws4+ohDym0MeXCkBBlmB+ YhSOobZX+37XDjjE0+6UiDKhS1Uef/1f2acw3Fhtzs8r/P3txQ60yTXUtWsbkZW+rl7N sXHlYrxGGzGlkMO0L67dFVkfzo7aCXVGjghqPB1vPq9RKj4zZhbJPkfT+prsPJobmKGX JHGDKubipMIqHn/qrhpMfXO7qMUqHbuLp6YfbOlJBVQHpTbr5UeHR23JXS2Xt2qa8DlY w0/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=wWYLPQcHggiQSDqWdRca3YZneGsfrnXudHSsBiBkBIc=; b=XR5ofFZw9GCOmbsQyyc9PRo5JeCqYPsvOp5lfYb1Bp6xip4zMdq1JRJnlhcwaNf3kC gU+yagFEzy8xUeGDN7E8Cgr2vXkInAEPte/fjnRtbQxWhlWRi9fODAfg5wKF07Gqs3UY RkOqrsZ+Hn7xYEVfjuZvGwi1+KJv4l8hKRfTPrULG3rlLTKPVniLtG7fTVI3TJJt1QZD r5rwmFXgAZj/ddZVkOiIM3je2+FCXkVHntXTgoVC9bpoa/ZVT0d/XC0E7SS9x6oqjta8 9Hop96k0rTck+l0zVmiZIErwOMGjukxvRlyxVVQXR0B6xoK9VsYv5eN/BpQ3HKQ0LdVX i9lg== X-Gm-Message-State: AGRZ1gJjrASuvvHBaUogQv8C2KA7WVCOkMvuIMiW2ofkDrK8qCYPMoHj BIl1jazGUNK9sb8AYPXQIqk= X-Received: by 2002:a63:4187:: with SMTP id o129mr3102566pga.370.1541954044537; Sun, 11 Nov 2018 08:34:04 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id x3sm1955380pgt.45.2018.11.11.08.34.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Nov 2018 08:34:03 -0800 (PST) Date: Sun, 11 Nov 2018 08:34:02 -0800 From: Guenter Roeck To: Stefan Wahren Cc: Eric Anholt , Florian Fainelli , Jean Delvare , Greg Kroah-Hartman , linux-rpi-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hwmon: rpi: Fix initial notify Message-ID: <20181111163402.GA17038@roeck-us.net> References: <1541937671-26385-1-git-send-email-stefan.wahren@i2se.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1541937671-26385-1-git-send-email-stefan.wahren@i2se.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 11, 2018 at 01:01:11PM +0100, Stefan Wahren wrote: > In case an under-voltage happens before probing the driver wont > write the critical warning into the kernel log. So don't init > of last_throttled during probe and fix this issue. > > Fixes: 74d1e007915f ("hwmon: Add support for RPi voltage sensor") > Reported-by: "Noralf Tr?nnes" > Signed-off-by: Stefan Wahren Applied. Thanks, Guenter > --- > drivers/hwmon/raspberrypi-hwmon.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/hwmon/raspberrypi-hwmon.c b/drivers/hwmon/raspberrypi-hwmon.c > index be5ba46..0d04572 100644 > --- a/drivers/hwmon/raspberrypi-hwmon.c > +++ b/drivers/hwmon/raspberrypi-hwmon.c > @@ -115,7 +115,6 @@ static int rpi_hwmon_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct rpi_hwmon_data *data; > - int ret; > > data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); > if (!data) > @@ -124,11 +123,6 @@ static int rpi_hwmon_probe(struct platform_device *pdev) > /* Parent driver assure that firmware is correct */ > data->fw = dev_get_drvdata(dev->parent); > > - /* Init throttled */ > - ret = rpi_firmware_property(data->fw, RPI_FIRMWARE_GET_THROTTLED, > - &data->last_throttled, > - sizeof(data->last_throttled)); > - > data->hwmon_dev = devm_hwmon_device_register_with_info(dev, "rpi_volt", > data, > &rpi_chip_info, > -- > 2.7.4 >