Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F106C4361B for ; Tue, 15 Dec 2020 20:55:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EAF8122C7D for ; Tue, 15 Dec 2020 20:55:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAF8122C7D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 531BD8955D; Tue, 15 Dec 2020 20:55:55 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by gabe.freedesktop.org (Postfix) with ESMTPS id CCD688955D for ; Tue, 15 Dec 2020 20:55:53 +0000 (UTC) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B8005593; Tue, 15 Dec 2020 21:55:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1608065751; bh=xb5DZF/iWKAUZNc6CW2hz9ucfUBOKmdOEtE5j10xqKI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cTs2Z/0N0Tq+OeZkdUlBYRk1YGBZnr0PvspMQvidJUmRuFS7SqYWGvRTSyBJ5BHgQ eYhc2EQzeIJQMuMMqQDcnC4yB4hyNoHFBsBPQldMIKn94CKfC145z8heRKwsMmm2zS 3zvst31S7grYS4ESBaxfNainwljQFlQFYIRUu+kY= Date: Tue, 15 Dec 2020 22:55:45 +0200 From: Laurent Pinchart To: Mark Brown Subject: Re: [PATCH] drm/bridge: thc63lvd1024: Fix regulator_get_optional() misuse Message-ID: References: <20191108173208.51677-1-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191108173208.51677-1-broonie@kernel.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , David Airlie , Neil Armstrong , dri-devel@lists.freedesktop.org, Andrzej Hajda Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Mark, Thank you for the patch. On Fri, Nov 08, 2019 at 05:32:08PM +0000, Mark Brown wrote: > The thc63lvd1024 driver requests a supply using regulator_get_optional() > but both the name of the supply and the usage pattern suggest that it is > being used for the main power for the device and is not at all optional > for the device for function, there is no handling at all for absent > supplies. Such regulators should use the vanilla regulator_get() > interface, it will ensure that even if a supply is not described in the > system integration one will be provided in software. > > Signed-off-by: Mark Brown Reviewed-by: Laurent Pinchart and queued in my tree for v5.12. > --- > drivers/gpu/drm/bridge/thc63lvd1024.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/thc63lvd1024.c b/drivers/gpu/drm/bridge/thc63lvd1024.c > index 3d74129b2995..ffca28ccc2c4 100644 > --- a/drivers/gpu/drm/bridge/thc63lvd1024.c > +++ b/drivers/gpu/drm/bridge/thc63lvd1024.c > @@ -200,7 +200,7 @@ static int thc63_probe(struct platform_device *pdev) > thc63->dev = &pdev->dev; > platform_set_drvdata(pdev, thc63); > > - thc63->vcc = devm_regulator_get_optional(thc63->dev, "vcc"); > + thc63->vcc = devm_regulator_get(thc63->dev, "vcc"); > if (IS_ERR(thc63->vcc)) { > if (PTR_ERR(thc63->vcc) == -EPROBE_DEFER) > return -EPROBE_DEFER; -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel