From patchwork Tue Mar 5 08:11:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13581829 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 1815DC54798 for ; Tue, 5 Mar 2024 08:12:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 06645112914; Tue, 5 Mar 2024 08:12:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gc9/q3Wv"; dkim-atps=neutral Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id 480B2112912 for ; Tue, 5 Mar 2024 08:12:17 +0000 (UTC) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a4417fa396fso659380266b.1 for ; Tue, 05 Mar 2024 00:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626335; x=1710231135; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=qZhcPKgdyjL8bhk28jJde1fP1o5dZ8nODM9Ogpw/oLw=; b=gc9/q3WvDL4fYTFjCmJNjQskMMC5ZcmxffpoXAPX9wdk7MXz5N06KB96lxE1msfMfz UC73vAmnRU3ob1EJ3AmTfJiaKUfzuSUY8EExCD96lC8jsiGtw6nHvU0u0yz7BdG72sYU Nfrv7JqDpP0oecewHh6D0Vs5KvkKZCj1cwJqGlLD2NFiGNDx6xZkIlNI4lVV4X/XK2zS n0qP/1+ga5VnUDVxsEw6jBo248JyV8GXxP5lg5/0E7b/Met6cuusoI6BpdjsUTBJqaMx 1m3dKbN7GqX71MSfNIp/N7HC0NNIJK71YhicNBDdQMSaCZYYPPc8u8yvDELF94CBbvoK 1e6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626335; x=1710231135; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qZhcPKgdyjL8bhk28jJde1fP1o5dZ8nODM9Ogpw/oLw=; b=t//o6t+yGmi9c4QW03RDYjOsrvVe/e+oQfOLWTUSphNawzC4Y99NxDDjGibz/+O28w iCICQUP78m1D7Rrry66R5JWNPMk/GqE6rnMb3cRDCYs4xgblmc7Hc5uppbvsJOqzLHOf tqN7v5nXFKQcstxnhJz40J6vansyHJzYljvYD7dMNb3oCP7+GeRJfW5Kfgqr6QsgCeYC 0nzEmdPR0Y+XhqPNTtehnxxkNMPR6pXCYdnH5V4MABFDyVTjhN6gU+03PdkxdmymISIW HLipK3oa1vsLKxt8L7CK++yT6IPq8R2uhHhIBVmX0HlHccaRaLqTL4+7yNGN3uRiQQ5V xv/A== X-Gm-Message-State: AOJu0YySxSCD7v+bLKNPYAyHuQ6wpJj14mVxCql7wcMt1zeukuJ5kJ6R U9V2ntjbo3Q9sqAqfarihSQ0d7QElLiIaoVTn5jrqvVhizjGT2+rtkqAYk6SEx8= X-Google-Smtp-Source: AGHT+IEuX6cKf625yCSFdJGJles12Fo1Zc/Eyc8YTMuYE42QgS4ym9vrzIj3xWMG/qe66D6f3pwLmg== X-Received: by 2002:a17:906:cc93:b0:a43:e46b:7a80 with SMTP id oq19-20020a170906cc9300b00a43e46b7a80mr7105432ejb.43.1709626335333; Tue, 05 Mar 2024 00:12:15 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:14 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:11:56 +0100 Subject: [PATCH v2 1/7] backlight: gpio: Simplify with dev_err_probe() MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-1-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1168; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=opt8++1g0VChwtIB/Fz1GiYx24pMTFMe80pujvPzm0s=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPWa6sw7b/TOSWZwZZYFLYG0BNvTG0TlbZoC 8bMfcQFWxqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT1gAKCRDBN2bmhouD 14vBD/9cqYKdrTAFMz6KcpOJxJ61CvuYnUPyihjwAG5ODNJ/TVWyi23DB4xZuL9d5a1Ff1xPt0K xenDTpvWcGV4PuNDjXe+sLUd0VWaBr/u/qSnQgDEhzYBbP095TSe7svObyzpsA6qK3c6YpxWv4J jRHXI5HShKxxPH2EqrqgzFx+xQOhmJAcBuWDyOCQDkJwGjvNShtjm/Bucp04ehxnXM2pmmdSTKV uH20IKKiZvxuOfnllFf117Iet3e0cK7KCMmcAy4CNi8N4Fyyo8+KcX1o2jwaYEJBzGqjSZJfHEc vRjVzwLQg2mBtty/lc4PwvvKabGqaIqiW9nDsqg7s8StjZZ2C1Xj6tWBgvGJiPJrOPscB0anvRo //2hXe/fq7N4168QtWlzL4qnPMBVMP7xjIFwwXCFasHOgBBuaYcWRYSmydbuT+8E+Ca5g7LWTSx Yt+0Nk5JLCTQ2cRZVdB7GYf93YoNlJ3mm2LS/bSDlBWQWuR5RMeuGTY680tY+ZGlCfbWp+mZxyX brBg1fFJMyxwb2hPg8YaH8BWgaqQHz2M/jMeap2g8W3xYqSJcrwk82QrnNzfw95/w0o5ejrpADE KKV05pkeESvkDdw0gNi+Jl++3PUHsLFtdS/Zt0LRqULopfstN3o6duCsIifq2E558izCkBczLjg m6Eh1t0XIs2hpyA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/gpio_backlight.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c index d28c30b2a35d..e0c8c2a3f5dc 100644 --- a/drivers/video/backlight/gpio_backlight.c +++ b/drivers/video/backlight/gpio_backlight.c @@ -64,13 +64,9 @@ static int gpio_backlight_probe(struct platform_device *pdev) def_value = device_property_read_bool(dev, "default-on"); gbl->gpiod = devm_gpiod_get(dev, NULL, GPIOD_ASIS); - if (IS_ERR(gbl->gpiod)) { - ret = PTR_ERR(gbl->gpiod); - if (ret != -EPROBE_DEFER) - dev_err(dev, - "Error: The gpios parameter is missing or invalid.\n"); - return ret; - } + if (IS_ERR(gbl->gpiod)) + return dev_err_probe(dev, PTR_ERR(gbl->gpiod), + "The gpios parameter is missing or invalid\n"); memset(&props, 0, sizeof(props)); props.type = BACKLIGHT_RAW; From patchwork Tue Mar 5 08:11:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13581830 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2970EC54E41 for ; Tue, 5 Mar 2024 08:12:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 30F25112913; Tue, 5 Mar 2024 08:12:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="GFeDG5cA"; dkim-atps=neutral Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id B571D112910 for ; Tue, 5 Mar 2024 08:12:18 +0000 (UTC) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-565b434f90aso7694618a12.3 for ; Tue, 05 Mar 2024 00:12:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626337; x=1710231137; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=licg3hUE5I9iVSUhaQvUY/ICMniTjfaDb2iJSuUjn84=; b=GFeDG5cAjJ7o/dotJyjp1WCJ4rIlOblIi2wm0nU16mZO4s6cHEbpjAMj+ebCh9oNwd fgcd2S3d/ciMqDBFgnB4YNm3k+qoSOb3vMnA12E0KtdcL+9OngeafRnswkrh+S5rwlyD t7+oonCbjVQPrwnKPanBG+QwzAp22xwIp4o/re4iLHX2oWuFyDeVlbfYEAFM4vAxMCwF r5EFNK+N5My8kXwtRlRcejJKW1+c+6X5a2hQjhrpu7RFsOfbb1cPeNzaK+fIBmx2Uy7D e9flgFXFnMvw6GNn6NXSUxHlcH1KBhLMnsxDmHfu1CZTpRwjK4A8Ne762pD8uv95qgP8 GzMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626337; x=1710231137; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=licg3hUE5I9iVSUhaQvUY/ICMniTjfaDb2iJSuUjn84=; b=GZdJuY3+fBoRO8mKOeMbWiK1YazhSi8oxTkXipxJEGxsY7PlxLbTWnki0cRbT6VCc6 yDd085f+ap64Kon9l1Z+FGJdknJdnE55i+44DDQsQ7u7g/MqWzn0IxHnD9hjpJbEprT6 KyQsZOmvze8U/L9MjPu2ozI6cc2qg6wsap5yzShDMIb9juvIy7G1t0zb0tUGGCdXOf48 Zs2Dl6GEyBqH0F4o0DFya2Yvt/fgjI+D9kx+AYoWghTB2TE5T0hM6xiEPCQKwaDpnjRp CneRiOTrsSBvNIrSHcBRQcrIbCpWp0Vhhowr4RL1LA8SXllPV97hB8WhehpKu0M9nrRN dEQw== X-Gm-Message-State: AOJu0Yx/hlNfmvakH0i6vLsNbiCK7+zKRYNrU5SvjWKPmdtlcl16wW0D e4dD56bxvcZ+0B0OW7NQOumFgGLX/2+0lgUEQgbj1O4kWMU4IDUe3m+iaTihhTg= X-Google-Smtp-Source: AGHT+IGfm7sGGkR9kUh8su5+o2QBu2BkEz27QYtpHoYuWXB8OY86QmE12Had2uOqdDw7VGaIixtjVw== X-Received: by 2002:a50:fa83:0:b0:566:51fa:3647 with SMTP id w3-20020a50fa83000000b0056651fa3647mr6968122edr.10.1709626336755; Tue, 05 Mar 2024 00:12:16 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:16 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:11:57 +0100 Subject: [PATCH v2 2/7] backlight: l4f00242t03: Simplify with dev_err_probe() MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-2-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2489; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=V74J1dzwFo5ezSQUueHMb1/NFOrfZ3e7TgmXv0EuHDM=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPXy6RPQ//PsVb4IYTUFFLKfQGgTqhNZjAe5 k8y1iiltayJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT1wAKCRDBN2bmhouD 1wKfEACbULmem8OvAeK+RHjlMayIwaUJM+uAeRNpZGPV6L4vyj8fGOfNFabiu5jtYwEOD8P1n5k sjmhuOectJ71wUf1KLkpU9jYUFDRIpF3IWplDn352HLVqkZevuejVUTS0D7zb2MHcs4HWf8ecI+ PRDIH87OTbGXXS6/CswU1Bnr83esrM05RJ94hfM5vkoom10EeTaCuD/GbCm0Qddi6VxMKnQF05U 5aUspkmJRq3JTIbZqpLsqcGJ4gZOBk10m+KXHEw66rRsimBz9hpnzyf3DC7dzmAxMZF9VUKY1xS fG25pvaOChS3UhIT3RjRcLUBElvel8TWrUIDXFIesd4bvewciUkRXPxlZm7iwzJv7rApgw93sNi fJPm2n0H5nbA+SXXlDfMgP3/QcVtfqkY6mtVyY/yU/j97vmq1tzodZVZZu0zDt9DWSfRXug6DZI OGULgir2GA6xgNGtufI4T115U3XlFPYpuzrLL9UawHvNJXlDcogHTMpjOZjvJHxHRa/9DdiVie2 goA++dpv0wqlnpInjDBFjh8MPlEqceV/nA/SkU4QAFi73i0HOQrDVdlUCrM+5cqHu/L+aeqCzX5 5ibcScLzNg7LET3QCv/K78ESsxWMz5U8T9vxWV8VAOaA8ILZkwLdjspJP344Bi4UQcBxiO//n1j GY2+W8LLtWpqZxw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/l4f00242t03.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c index cc763cf15f53..bd5137ee203b 100644 --- a/drivers/video/backlight/l4f00242t03.c +++ b/drivers/video/backlight/l4f00242t03.c @@ -179,34 +179,28 @@ static int l4f00242t03_probe(struct spi_device *spi) priv->spi = spi; priv->reset = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(priv->reset)) { - dev_err(&spi->dev, - "Unable to get the lcd l4f00242t03 reset gpio.\n"); - return PTR_ERR(priv->reset); - } + if (IS_ERR(priv->reset)) + return dev_err_probe(&spi->dev, PTR_ERR(priv->reset), + "Unable to get the lcd l4f00242t03 reset gpio.\n"); gpiod_set_consumer_name(priv->reset, "lcd l4f00242t03 reset"); priv->enable = devm_gpiod_get(&spi->dev, "enable", GPIOD_OUT_LOW); - if (IS_ERR(priv->enable)) { - dev_err(&spi->dev, - "Unable to get the lcd l4f00242t03 data en gpio.\n"); - return PTR_ERR(priv->enable); - } + if (IS_ERR(priv->enable)) + return dev_err_probe(&spi->dev, PTR_ERR(priv->enable), + "Unable to get the lcd l4f00242t03 data en gpio.\n"); gpiod_set_consumer_name(priv->enable, "lcd l4f00242t03 data enable"); priv->io_reg = devm_regulator_get(&spi->dev, "vdd"); - if (IS_ERR(priv->io_reg)) { - dev_err(&spi->dev, "%s: Unable to get the IO regulator\n", - __func__); - return PTR_ERR(priv->io_reg); - } + if (IS_ERR(priv->io_reg)) + return dev_err_probe(&spi->dev, PTR_ERR(priv->io_reg), + "%s: Unable to get the IO regulator\n", + __func__); priv->core_reg = devm_regulator_get(&spi->dev, "vcore"); - if (IS_ERR(priv->core_reg)) { - dev_err(&spi->dev, "%s: Unable to get the core regulator\n", - __func__); - return PTR_ERR(priv->core_reg); - } + if (IS_ERR(priv->core_reg)) + return dev_err_probe(&spi->dev, PTR_ERR(priv->core_reg), + "%s: Unable to get the core regulator\n", + __func__); priv->ld = devm_lcd_device_register(&spi->dev, "l4f00242t03", &spi->dev, priv, &l4f_ops); From patchwork Tue Mar 5 08:11:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13581832 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 144DEC54798 for ; Tue, 5 Mar 2024 08:12:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A07F4112918; Tue, 5 Mar 2024 08:12:24 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="B93BeP3x"; dkim-atps=neutral Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id EFFFE112913 for ; Tue, 5 Mar 2024 08:12:19 +0000 (UTC) Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-55a5e7fa471so7375575a12.1 for ; Tue, 05 Mar 2024 00:12:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626338; x=1710231138; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SGEzMDVs2SuhSNZcHsDkwLnjMMEuR/jN0H7FBJN5bdE=; b=B93BeP3xrFFnQGqCHs6LBX5RBmoZ6ha9Uy/WqyhOHfEk65aOVHhfVb/yz0NuPZMDUr 7v3dt+jSXUW5mmdUJnhnAxP0al0UzyVUTYSkEkvWhY3VH1jECpXqfzkgl+vDClSo07V9 VC/cqVGZqa20D/V4tTqBgZf63/5/fxvXsLUB1htj7LRreOA/OHrZenCDLkCCgqz+Enc+ +KXZRPkF5ZIfkp2ms6GzdyZ+Bs73NImrCQ2fsOca+j1Uo35gW0y77StB8daY9Ga/9GKT ao5hrs0SUsIdFPMbzInavMxrJihz65i37La90pTmFQ4RBzZ1/Wm9rRXx1b8m8eSMmNxf yGdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626338; x=1710231138; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SGEzMDVs2SuhSNZcHsDkwLnjMMEuR/jN0H7FBJN5bdE=; b=qEpnp9FH+YLsfyZVZy+Fps/aLb8SnDz7x75gk5GshLUIwlRHVc+fZt6AvCkrpLa2qJ 2Ku9nz72I8kYPMr64sdbUXcSFV36Xpl8ObnNs+mZfTFZCeuYelcpVvUPnzRHx72EmnIP I1czAYQzyjIdEe/bHeurlQWVEDh/AuIVlQvykqofc+g1EvlohyoLiVOPwu6Zwa85n2PJ UXwmwIAQkmsIA2AgoBqSCIDTUuRE6UhviVHSJgu9AxuZd5xMBi7Ygph9i3q74u8Cdvcc qZ537gRyFom6hs5bTkNdDHHmstGmmrfeqJLTJlYhWlbJcHj3InVAZvxfzdLWLidwWBPR haAw== X-Gm-Message-State: AOJu0YyNdjk4aBHu8jy9Hs0Otp33cHreIsad4u55c6n9teEbJQMkXN8l xUtpiuDUWRBWkuGL+W3kdwYdTloSbFJuMv7UV28OjGooL8eyNG/T8OaDuyQSaIM= X-Google-Smtp-Source: AGHT+IGPoDsTMtd30w/DOshzWoUEHpx/Q/pa5sDpp/arpdkYcoyWSkhqspl63v7mKF9KA18tbb+Y6g== X-Received: by 2002:a50:c88c:0:b0:566:44ca:9f5c with SMTP id d12-20020a50c88c000000b0056644ca9f5cmr6893675edh.8.1709626338138; Tue, 05 Mar 2024 00:12:18 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:17 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:11:58 +0100 Subject: [PATCH v2 3/7] backlight: bd6107: Handle deferred probe MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-3-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1306; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=utYDuw34nGuToY7y1IT+NIEhf3NsXvVlpcJR4JW2mxc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPX0BTP6R7BZf+T2A19wNFHqlTtCuGUa2M9E W+LsqYM6eyJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT1wAKCRDBN2bmhouD 17l9D/9V3Rtsc9kSl3ihhdhQ3TA7WjcTHaWmAnmked6/2v/yRSimxEfAaz+db9sq1EZ23XaHlA6 ICFtKCF/SvSGy80HnJvGKX1Th7Eem6h1onaS0Zip0WVVyrRzkoIKYfLbHRge29FExq6ycEcDF7O 5bu0FL7MaiwjmEbP7Kyb57n+Vp0V/FUbVMJz4dk4QrVSkZyJfUa9PGjURWJN7QZxVgFp2ntwxNT tcnLYB6kr4o9/xezchi5rX1z+tRx5cHZZyr2KTDqRL50k6xeE6lL3WYyfQNyNaObvGZeuAn9rbA TOqHm44+n4QD1zGM2jG+9qTb3MCttYy3J3ix6WXhUl2VOzA3IUYARp7Gy09+r3EH2JDwWAHWkf6 OrNM3MxYy9jAmkXNxPkcOoHxm0Mynoz5IQlX9kwcwruj1Eu7Y+rSgjrd9hg+fgc2CuNsb/VPkR5 Pb2gsGKYCLQSj3akNr6JTu7T9ch2H+scaP40a169Nc5mjwqXNWTqx5vw17OjuUy3+xYkFmS1QFc tnLVTBhUXjpum518RA9w30D1JkVK5K82wlOAKZdiwgZ16oREN6NXUIOMZwXW9zsQu4X+ZL8SqXP IOa1VEKXQ+H9MIVu0sgGul2COHGnhRJgbOc1dJZrgbXQ7WS6XOhzflJhcl/ct4yrxqnepmw2Dxh MgoyRlqN12K8NdQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Don't pollute dmesg on deferred probe and simplify the code with dev_err_probe(). Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/bd6107.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/backlight/bd6107.c b/drivers/video/backlight/bd6107.c index c95a12bf0ce2..b1e7126380ef 100644 --- a/drivers/video/backlight/bd6107.c +++ b/drivers/video/backlight/bd6107.c @@ -119,7 +119,6 @@ static int bd6107_probe(struct i2c_client *client) struct backlight_device *backlight; struct backlight_properties props; struct bd6107 *bd; - int ret; if (pdata == NULL) { dev_err(&client->dev, "No platform data\n"); @@ -147,11 +146,9 @@ static int bd6107_probe(struct i2c_client *client) * the reset. */ bd->reset = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(bd->reset)) { - dev_err(&client->dev, "unable to request reset GPIO\n"); - ret = PTR_ERR(bd->reset); - return ret; - } + if (IS_ERR(bd->reset)) + return dev_err_probe(&client->dev, PTR_ERR(bd->reset), + "unable to request reset GPIO\n"); memset(&props, 0, sizeof(props)); props.type = BACKLIGHT_RAW; From patchwork Tue Mar 5 08:11:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13581831 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2E9FAC54E55 for ; Tue, 5 Mar 2024 08:12:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CAB40112910; Tue, 5 Mar 2024 08:12:22 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="LFRT+FT+"; dkim-atps=neutral Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 52A24112910 for ; Tue, 5 Mar 2024 08:12:21 +0000 (UTC) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5649c25369aso7540660a12.2 for ; Tue, 05 Mar 2024 00:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626339; x=1710231139; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=POVvCdCwqgBsDTzLmq+xlV1vSpeRHUQ3tEhlOTxlYcU=; b=LFRT+FT+IEf8yV+WULkyCENAWdDRuvcxAK0co2Az9KYdDtqz1cxF8Bj4wCX74VMHMd TVFhnx9FaANi99IUlRATlAh1Yyx6WT+qpVvyM8m3aVkbNisnS5iWdkKsmakdqMAy7aTd sJyage65ApfBy4zGwce/gz80zJJCNFzbgQi2EGoI0JLuIkuv4MfqTDP6rhxsESsHIOfF Qu5J91ZVqomW31xmz5asUfIt+9lN+dVICA3EHmKfUTnA6URSP6S/D1Z4t6xTAx31ZBlF OjsYLFASF35LKxTFSZDN+62JfBgTLVHCv45DG8v0qKO0ZZRhQlDTo/HvHieYZB7ex30t vvJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626339; x=1710231139; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=POVvCdCwqgBsDTzLmq+xlV1vSpeRHUQ3tEhlOTxlYcU=; b=dSbnJghTmKZg4kyUC7yk4TbUGRI40syCYiuN443b5nKtRiFFexM2/96A5s5Y+/hrpe oDandr/TeEJhkcxc5dijNqYTVgIUNRgJ2IhiRLYrm/CugRfUBVPLNvrsHrHVrQ4WkQtW iApSUxoT++gZbx6hH1pUr524s1lLXz69vZ12EwV2f3QR2wvJ53VtFlbsu/s9VAl73IUu pTRepHXRJDQaTx51wnfpid9t6+3434eHzysIjqzy06bfl244x2MHScvE5AqXN6M164bI ie6z4yz+miUDG0MeNFOk67MDSF3tGlfoBtNjeYttlsq+jI03zZPFgRw9gAfzX8v+safZ tDGw== X-Gm-Message-State: AOJu0Yyro0kXMZPy8vr0Ae9/uDH8Lgd9DLxAFIOyqKULo2SX/UvAqnQE P6PyfXvdEd2UAkEvYcqM4HIzzJQg8Wlhwc6wWYbtk6wsCLVunrHzn1WyhaKux9o= X-Google-Smtp-Source: AGHT+IGOwgFjm9p+7mY8WcaCSk3d8VXb2bBW8TuCFZ36DSxBXROjoRrcLWhEMUftUIgCJZt6zZLL7w== X-Received: by 2002:aa7:c3d9:0:b0:567:38db:8076 with SMTP id l25-20020aa7c3d9000000b0056738db8076mr4309804edr.21.1709626339498; Tue, 05 Mar 2024 00:12:19 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:19 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:11:59 +0100 Subject: [PATCH v2 4/7] backlight: as3711_bl: Handle deferred probe MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-4-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=959; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=rLcNWyHrJ59PgQVMQdROdn158veQsUOWpOpARELHPHY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPYiTvjPqEeJttKrU7WiswuUE0dpbgygo9ZR 33m9uiM1euJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT2AAKCRDBN2bmhouD 12YgD/9IXBNCquP3bPqgvY8F0d6uhoxY77XF+TciANVjhfSwKpU37EewVGovz0Iqnt6HWaDWN6j F21SWV7MUAEoUrnIsLHKojTKz8CSXamKEGAjPAtUUXOMgjFneB7r1biTAbhkdeLR98b4MUJOdel 816YAtPIwC6d3RgCF19e5h8rGj2fxWNnb/qJTK/DKsNNN8L3m+lczzFyE3aFdcEcW/IrPEFlZ9r M8s6i3GDwbVINPBfSTKmJLYUJyLuyJiohQTgzlU7Nkcp6G2I4ufyiAmZP8/kmMG8w2ZAJ/M3y0e PvQ1z/ZuFfFqLvNZZiuL7IkG5UQJ3FVLtCIsure9tkDLyGUNsHIFutW4dHczc9HvFvi9pVzt6LK 7T6rw/26yrYKfCaBJEGn9zpVaxiAIl2XczCIo3Gz5Aygy/8U4p7y+oUa9qUawoutjLXtTCDbKIt OgbZlnYagsZCtaQGiMG5aFwX586KxBz9a4td3TUSq7L1Osa1d93WVbNetGeaLTTfoB1Rsu0SnSV YgXBWi7SbTL45BS82xRTGDrf+jctkC0oVC1qQELCRTwBzwH6QHUzn8lBPh+mJgViOMMWlqTpblo xumCSjPITNs0L4Yz2T6PqFn/0xK7RlnvQbgPxII4GvtnVm4lCbuJ0yCedULW9uBWchL02hx8wbK R9FlO8clmcCQD2Q== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Don't pollute dmesg on deferred probe and simplify the code with dev_err_probe(). Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/as3711_bl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/backlight/as3711_bl.c b/drivers/video/backlight/as3711_bl.c index 28437c2da0f5..e6f66bb35ef5 100644 --- a/drivers/video/backlight/as3711_bl.c +++ b/drivers/video/backlight/as3711_bl.c @@ -383,10 +383,8 @@ static int as3711_backlight_probe(struct platform_device *pdev) if (pdev->dev.parent->of_node) { ret = as3711_backlight_parse_dt(&pdev->dev); - if (ret < 0) { - dev_err(&pdev->dev, "DT parsing failed: %d\n", ret); - return ret; - } + if (ret < 0) + return dev_err_probe(&pdev->dev, ret, "DT parsing failed\n"); } if (!pdata->su1_fb && !pdata->su2_fb) { From patchwork Tue Mar 5 08:12:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13581833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B9260C54E55 for ; Tue, 5 Mar 2024 08:12:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 394A6112919; Tue, 5 Mar 2024 08:12:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="XWXg/mFG"; dkim-atps=neutral Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id 80E52112910 for ; Tue, 5 Mar 2024 08:12:22 +0000 (UTC) Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-55a179f5fa1so7835282a12.0 for ; Tue, 05 Mar 2024 00:12:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626341; x=1710231141; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ExK15caTzPYyfdwBopINcQ7SZOSz6etjc7XyN0ZMwpo=; b=XWXg/mFGCVEHOH2bWvc12QJgpivJIYslaK9K2wRm2zZD4KXuirzyKDcI54ou8FGqGe AsJ/ZmCu3I7+MbjHYGQVNt48kH7MDt5c+YtUNZ6wfaH+bArXVi1a+jDqOh4Ne+kpq3Ig wNzYhane7tsl6VOFXauWqLDWEAq3nUSAUcrX9lMYJTJEghdd/6VZ6X41ZBkvF/QLOr9S 8j7X4zu2fvUZdWHTHSZl+EYPcVuiYnBQjQS1GcFEzSEEIyKGF/Wd/OAF2jUHafQ/cr3c PMJOD0jgUQiW+p0aWo4BjgSGZB65PGSpz/VfLTrcinn8x007cpmqnhVkEBUAZ0tFeh1I 5wBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626341; x=1710231141; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ExK15caTzPYyfdwBopINcQ7SZOSz6etjc7XyN0ZMwpo=; b=mF7SYp9+l3HcE/CjAEguOJD714N0+2+aMtfuT5IwIEv9FDQ/5AgEqoiRyCfbtHr4Kv 9iJDveY2wO6d6zfe5eup45ADAGkvBkqerUkQLIfyrbgXS38P6Pp7nYG7PCoHp1wWnBAs gReavobt7rSnsWjLTizlpZgXbqnkV60jRAJT9YIQvph66f7Wsq5VGEUoSMmD26KlMJpp hGEzIAymXnGlujx3wgsEMF2t1A+Rclt57WdAo70bwEkv+f+VlNVewAgnJkg/StV/kPoX A9d2xl0PMN/i46+MOehhKNt5lLK2R61p8vj0Y0SXrtPJqSFKYsWeaDJi+/pcSedH/Crb /zvA== X-Gm-Message-State: AOJu0Ywx4O9sA4Th8YRob8rsob+b/+Ce+9YDtH+BO7JlKGmiXCyS0MiE C41i+kOo34d9FckM/2GuH2oRAjqrjvtUQqnr0LaGY+yoUn0PIrUFt8W+khAXSlY= X-Google-Smtp-Source: AGHT+IH/uA8GkUvAAQ9ECD3IzSDFIVVQwU0E2DIbx0rKbCTdLIrwu2V+eRJ+cIeAiM/1pjiB98XZfA== X-Received: by 2002:a05:6402:2315:b0:565:6c72:40a9 with SMTP id l21-20020a056402231500b005656c7240a9mr7989319eda.28.1709626340845; Tue, 05 Mar 2024 00:12:20 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:20 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:12:00 +0100 Subject: [PATCH v2 5/7] backlight: lm3630a_bl: Handle deferred probe MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-5-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1069; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=zeZODmCY1S1uqMpI2blr7qYy9ZObZCI7jQk2MUKiyFQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPZD8MWfLYEt6rCWdnIjlfRQIRJw0u4/qqS+ k5T0+JBGS+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT2QAKCRDBN2bmhouD 12fvD/4o0bBt8fofIHD0XpWwJNvU3Os3cazAVsGlsrm4AuCVvGk4aJQUwr2TiCM3Tkz148/bo04 ehgJuqLPlK6rYX4fV7mjoMH5d11p0rH7Ik63fMZSXY6zDeOGCXR3nQQXSJ8Y1boQ0sqOCTS7FcA 4D+RC5tismY1qTv62ISrDmk2aVKW+UwAXM3Kt/rrxfN9sNQNh2XdZrdMN3QCwAsbyTAAM9k+Sah a7MNxdBbIVgGdUN2XZXri41Fy6WZXRCKDY34ISqggHrDp9u1q+JdB3Pvj68dwlBQthT7Cg7wEJP TA+vuZiV9M/TVJJT1sQXUs04vKn0BoVS9z6+h1tjhcNDWlJRFA63MIKJT2mw+v2UzcESTKY4scn ZHNt/lrucx4IoWVrEcqRxuEuvU5EDgG29iOl7BvCUattDGdpScEa5xxY7CCalBMIW26ip0r3jmf iyWE/FslUQjV5eWS4WgWzLeBFcKM7kMXojpndsq2Cl20ZQ9Zbb3wXMAKTlgAVroWrN845KAHvtK Ejq/Tcd680GH8y2/bWK/E9OQD2oP/K12UQltNNyvPVkO2NeQIaNAwRxOP3rBfGtlGhBrN1KYjp4 ZsngSrMfZarGq8cQ6ZjWGWsgbSWrk+CecKiGZLj+kijL6abbj/XTfgUojaUpKnlbDanESNAGN3u obK5/meKgl1VgFg== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Don't pollute dmesg on deferred probe and simplify the code with dev_err_probe(). Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/lm3630a_bl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c index a3412c936ca2..93fd6dbccc28 100644 --- a/drivers/video/backlight/lm3630a_bl.c +++ b/drivers/video/backlight/lm3630a_bl.c @@ -563,10 +563,9 @@ static int lm3630a_probe(struct i2c_client *client) /* pwm */ if (pdata->pwm_ctrl != LM3630A_PWM_DISABLE) { pchip->pwmd = devm_pwm_get(pchip->dev, "lm3630a-pwm"); - if (IS_ERR(pchip->pwmd)) { - dev_err(&client->dev, "fail : get pwm device\n"); - return PTR_ERR(pchip->pwmd); - } + if (IS_ERR(pchip->pwmd)) + return dev_err_probe(&client->dev, PTR_ERR(pchip->pwmd), + "fail : get pwm device\n"); pwm_init_state(pchip->pwmd, &pchip->pwmd_state); } From patchwork Tue Mar 5 08:12:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13581834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 36F59C54E41 for ; Tue, 5 Mar 2024 08:12:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3356C112916; Tue, 5 Mar 2024 08:12:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="E5ACIHTI"; dkim-atps=neutral Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B6CD112918 for ; Tue, 5 Mar 2024 08:12:24 +0000 (UTC) Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-565b434f90aso7694766a12.3 for ; Tue, 05 Mar 2024 00:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626342; x=1710231142; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0Fm6lCHtlVIF1F+K0N/OPMuiMCrX8DVXWnanpZaecTQ=; b=E5ACIHTIiKxQeAHY9N+vDLu5ed2WPW/ut6RuHviqoCLOpqySsR39jMJcp0QiT1Rf1V HxBnBiLlm3iGj/UJCc3zQbkgoxxyorboiLWCOMKWaFuPiC5SIRizJA93LtHO80roPMV0 9I+4tyK0SgZoDqpFGQ0ZMMYukheBFiFAq3ayVYGZegzfzMTxEVR4HRno5CpdDCmnlmGm SqIAbBdb8d55X3tDZ7gKOL0fGgorVi+gjRHdzgtn+6fGLBSVVUJzkKidpDDoX8wbOzvw mc2bVtELn2QFQ5IJpKyZl1OXIQ23cUzZeqmVz/ox/0cbsAEgDokTMM1RdMOfGSnPWC/j aJ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626342; x=1710231142; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0Fm6lCHtlVIF1F+K0N/OPMuiMCrX8DVXWnanpZaecTQ=; b=AG6iUdscau2V4TqgZLVM590RdNVLNfwmVkdSBX7nZUSgnFzmvIAOwedCgcrUtBrpyV 8BtBl6OuEG64u8XrjfI2+1OIw73DY5iKhEP9m9S7PlbjEqE5FHV5Z3YFFVf0onbzYvTb 9oamcJ0P7QJHADe7+yC3QFUhzVZiRV2lCY7vxUEwumMvx+R3sO8bV+TQcssHM/mTmpVd AcUltM92oOHy5eBom0U02k4rv0n0LGcreLs3dOdq7ksGr7S+WjX475yQtKivBW+SrIlR ajXjOqgA0qaU8Jc+9TFd3IyNhJ015TkjJM8d8pkxUhC99z/EtI9FYY3KJB1JmVEazjd0 jNDQ== X-Gm-Message-State: AOJu0YwbpVGKC4sDqC5DdheaeyGPWDzJMGEmUGOi2IfPYIpgdfmYCQtC 54slsvTPSCI32cLcliTWwYOfgjgeX8lwfD5hsGGAalYo4XMuFAVzwWfv7pLCzV4= X-Google-Smtp-Source: AGHT+IFmQXq9OqnAqZ7n+ipcdaFFZ7KEXlOXnYPr+dCB5rotQlp6U8HU8sJNK8HhuEbg+62y8KfoNQ== X-Received: by 2002:a17:907:367:b0:a43:f020:57ed with SMTP id rs7-20020a170907036700b00a43f02057edmr7581833ejb.73.1709626342374; Tue, 05 Mar 2024 00:12:22 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:21 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:12:01 +0100 Subject: [PATCH v2 6/7] backlight: lm3630a_bl: Simplify probe return on gpio request error MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-6-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=961; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=YHeoQ29NKf22XZpaybrdYUUdK12wkL0lEB4GhWf8FTY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPaMO81r5PpyfYzgPlAboOMwxF1eOJg99FdH BQsx0i+aJqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT2gAKCRDBN2bmhouD 17VTD/wMe9QVJLWWgoGJhpJgK0qfzqPtG2LHvEiQKHIc9p4TZH6iIk89FjqgbQmllt/sCIdLPzD 5jCNPAb6QsYi5rBbHw9tXOW/fw/bA1XSeBdKReHR4xtnTd+Lp7ZEMe7thHzzhEXCEW+6AuW5Zh7 vdcnvZPWJcVUV9QokX7gskQsHOTHg8M9L11ICQnn2kgJqtBvffsN4z7tRx0gFY2BFkV390IFTZa hHlBhzDWyYxYAp4I5M7OUld5ga37cX1lmBM8aWaC1lj+UoSNe1XCQPvo2mp/0U+hEZGCkCW9T5c d478MV6wl1sAsoVRUq1VmXpOYK8+oi8beiW5SF7YWtT5knT7Z99N/kfc/MPdrN8WqThf+6TE6oN Cehjm5fjzjvLxM6INXJn34dwTXkGgagvWLL9SQwrOtTMAx3h/PBIGINvCaOzapuZeDwCS4vfvp5 CLS7LbPOYq/0XbEwySMM86UcHe7Is6dZHYqDXfMnEuxh5EPQUnDFiYrs01SINbxX5i/N8rT3ovc xaTofPHKif7mPAFTVBudQKQb0oQQwo14veJnxVLsXfapCKdnDEjrX4uqhtstonC6F3vNX9w97vX 5gsi4DlkZSWtsii/UFMd1cohSPSSv9zx8VS2TAbTXmafKMfVKjf5caGdDisNEoGNN96UoujMDcp krxxRUqlxMNOQRA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Code can be simpler: return directly when devm_gpiod_get_optional() failed. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/lm3630a_bl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c index 93fd6dbccc28..ac0a60e39e39 100644 --- a/drivers/video/backlight/lm3630a_bl.c +++ b/drivers/video/backlight/lm3630a_bl.c @@ -543,10 +543,8 @@ static int lm3630a_probe(struct i2c_client *client) pchip->enable_gpio = devm_gpiod_get_optional(&client->dev, "enable", GPIOD_OUT_HIGH); - if (IS_ERR(pchip->enable_gpio)) { - rval = PTR_ERR(pchip->enable_gpio); - return rval; - } + if (IS_ERR(pchip->enable_gpio)) + return PTR_ERR(pchip->enable_gpio); /* chip initialize */ rval = lm3630a_chip_init(pchip); From patchwork Tue Mar 5 08:12:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13581835 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 99F7BC54798 for ; Tue, 5 Mar 2024 08:12:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 78319112917; Tue, 5 Mar 2024 08:12:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gOC09t9s"; dkim-atps=neutral Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id AD076112919 for ; Tue, 5 Mar 2024 08:12:25 +0000 (UTC) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-55a179f5fa1so7835345a12.0 for ; Tue, 05 Mar 2024 00:12:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626344; x=1710231144; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WIh814IMUk5rVefYqFVUgBnp3hq65uUsqUe2ecL/Y00=; b=gOC09t9sSOVeOU/HhevTxerVAG4YP9/EkYh3nHhmmXG/ISF0ufJtXUiPH2s7RwSY01 w99JIjtCkivhJhPSw1NPaXlMxuxQ4JplBMy/Ifne3LrbOat3ld1pfGP7rZpJZ0HM6vpM W1fVTHqiyMMg5XbV7zYeaPEDF8bP3M3jjqL12sZbEzPhiF4qSrtB2H2rVlUQ0PigedGh ViAAqnAxWI6TzUtJwxYN7gjOfXFLkQ+BjlyE7rNtc0LiRfYiVIglszVUmSrxv4H+z6pi UNQLkGFQCE/P6WVdvXk3YcRWvLinN1d73nDN+HF1LmI6YyEyIjTqfWK58PYYdv0MSvUu oj/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626344; x=1710231144; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WIh814IMUk5rVefYqFVUgBnp3hq65uUsqUe2ecL/Y00=; b=cqmoV+2339yspGeVQDPmmVT578yNIHNvTFlazURHm7ecwMAegWd5uruaGDt58F10eF erG3S+/dMYFVqTfC3yTYbxKrVcsM7pkkU4N5126bl80K5CaMvl7up+pQhnC0slzQqDfr CL5ElM6HLiiNoovhch4gAGbeuHaFWZaK34FrI+68yYh+NA6CsuF02t3HqhSBhQKyG7BN wk+AMJddDl+ZtTHTX6LtWdHQUm92dkkNe2gb72iZKzMJLNpkMVX8nKNITUmwu2RdH+gL y2So6EXe+wmet0MH02kvX0XREWrNw9PTDu1P9JEUF0dogolrbc6kFVl0dITKHp0kN+JZ 2IrQ== X-Gm-Message-State: AOJu0YywN8OGTqSSLaEduVuQ814TU9gwqnCMOu/ap3lbtpUmDjWEVugT I19rWu7Qg8AI8K1xNglcO94xkOh6vVftJFzQlEj/r0RieiOshIPQw5QPBiZbVas= X-Google-Smtp-Source: AGHT+IF1NY0Hm8ivs7aO2+SykkAen2RzTu+xu239XL5G/CqAmL0kvEQP4pA0JwC31R81oKLIggZO+g== X-Received: by 2002:a50:8d8d:0:b0:565:665b:9c82 with SMTP id r13-20020a508d8d000000b00565665b9c82mr7135380edh.8.1709626343919; Tue, 05 Mar 2024 00:12:23 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:23 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:12:02 +0100 Subject: [PATCH v2 7/7] backlight: pandora_bl: Drop unneeded ENOMEM error message MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-7-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=920; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=inLsT1VkNNpcQ91Wz4F9uFHvSwYM79hrTLwE/rxQxRQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPbyLAGnwidHT2FhDojPQp4jpY01sPQHqOsh 1z/ozH7T0iJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT2wAKCRDBN2bmhouD 12mnD/47jc0NyWr3MU/W4BdsljAD/lH82VZh/9UG6ndVSQ118crkgBJGB86mt0+q+Grx5gxZCNN iarLv2GUAyMLnhsbsH0qm9lS0pkbkldTzyH0PDiOZTQ5NqvlHwhsOzSOlnBwx1aTV4jD6cZ3Wre X8lLUBtRlWqBZokl19oxqnNv33aKv5wby2A3pG6NnDT9pQAVhJSPTQKhIU8toq5pJFDZ26+ZR1h Ij3ea7Y2uuFPzhKfX/1F7/4RIHOr1arNpK5UrLfqVYz6U1KW8fSYp1dEXPHtNVAZa/WyNOIvuet qAs4Wbcs7dK9dUwJvYodbX1Mu1rL9eL31DP584V/kvHGD5Fa/QKXSNYZeni9QHR20ePfn51AGtF mwY+6TEK2OeD4bZONtbfdE+rFQczSLeHZrLJR5ikdjpz1jhc4qNtZHt9KykjnmP3ZU0gu+R+OFH aXfu+83AM9jkHbHtXg2tfKmJ2wneXwA/BRsK8pA8uGSYi8xWnWdf3+2vS3U8xYXeC6c3m4ssWeW PgZPuWc9qxZx4oVWeqBtW+8OS7Al0h591hqL5qhY5xaP7nPflBUbJX5nvmTOoXN/sJyxCvWDcT1 eN9R+7hv/QsHEIHSXMoiJzEo08OjuN9VGUeyn3Gf5ljzobDGTG/m0r3R6/1HYdLlXkHEXxLgF4u u9l+0dt1vrXNYpw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Core code already prints detailed information about failure of memory allocation. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/pandora_bl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/backlight/pandora_bl.c b/drivers/video/backlight/pandora_bl.c index f946470ce9f6..51faa889e01f 100644 --- a/drivers/video/backlight/pandora_bl.c +++ b/drivers/video/backlight/pandora_bl.c @@ -114,10 +114,8 @@ static int pandora_backlight_probe(struct platform_device *pdev) u8 r; priv = devm_kmalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); - if (!priv) { - dev_err(&pdev->dev, "failed to allocate driver private data\n"); + if (!priv) return -ENOMEM; - } memset(&props, 0, sizeof(props)); props.max_brightness = MAX_USER_VALUE;