From patchwork Mon Mar 4 10:11:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13580350 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 879E0C48BF6 for ; Mon, 4 Mar 2024 10:12:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0CA2910FF36; Mon, 4 Mar 2024 10:11:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ovC8AprL"; 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 3657310FF31 for ; Mon, 4 Mar 2024 10:11:56 +0000 (UTC) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-563c403719cso5869699a12.2 for ; Mon, 04 Mar 2024 02:11:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709547114; x=1710151914; 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=2l7UpgtGLmRWEg57s509hO79ijY7GD7vXKq1B5m81jQ=; b=ovC8AprLh9waKSGzHui8ZDPYxpALYzBWigJwNNQjCg8ZbPDwIXbfZgawSEdBeqsAuL OHvug2G7OkYVusCqbZcxx5en5ceBwhnFyjWN4f0FwoOnsFNlI78fsp+1iFy29cKzZOml BRSLprLCsdUJZHE8GhlV74nqPTmKicKSWimVzAoOfwinHmyvuFi3ord//0tdHsyW3ckc uqjC9ME9kzrSHArqRe6NP5dGRnzJCXQSqo2xcj+mbe6IZagX8rxI5sJL3Da79BegmjxX BrTC+zxZTTKdR9dZE/lYykknv5ZHQNyCbgZlldk4Z1E3zZf4QYi2C7EDYT7/udU08w9O mJ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709547114; x=1710151914; 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=2l7UpgtGLmRWEg57s509hO79ijY7GD7vXKq1B5m81jQ=; b=Z6hUUH/UFoyKf4j6D6ZG49rA1djpiwLRIwPYVTVLEw5uoaSa5TJfMoXpsMJsGmwDDH 4gCebKTmZ/cT7/kX+Y3EoaCmNZaa+t6D+2IOc/3qqrCeQFjum6pyZFdXZfBPcSiIsDBc TUdQQm4uEV5uJR12Uv0Ot7FeuD1VYKzzllFCCXo4OQGDys1I6MvfEYh22QRfphMufME7 KIycinMOHF1bvfVmA1zZCIEANWhQZNTkgWtie7b3OFJz0SW1zo6j9R4rQwy9lg8byZp5 LQQMyKV3tjARBUZYeywFJN+jLJE0N4QwQzgdU3r+csHiCRR/APwE4ELR+3+ovKJbAXsE YSMg== X-Gm-Message-State: AOJu0YywwgWJPujv7ZaCbU7CdCmWQl2EyW6xbrn7D6mQ2geUkSlS3Nh9 Xolaceg91rvZqVaZ6tyDwYAmB1R3C6PmNVegIdtC1v12eTmyDvXTSh+pWPrfrkI= X-Google-Smtp-Source: AGHT+IHrMdwkW1PUb9mRl/nOw9W89HypdtSeRHnOOx6YuKOHBeKBikpsljjl7tT07UnolQyMcxLIZA== X-Received: by 2002:a17:906:f8d6:b0:a45:2e21:c78c with SMTP id lh22-20020a170906f8d600b00a452e21c78cmr2053919ejb.13.1709547114198; Mon, 04 Mar 2024 02:11:54 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id ef11-20020a17090697cb00b00a44bc99cd89sm2938481ejb.42.2024.03.04.02.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 02:11:53 -0800 (PST) From: Krzysztof Kozlowski Date: Mon, 04 Mar 2024 11:11:38 +0100 Subject: [PATCH 1/7] backlight: gpio: Simplify with dev_err_probe() MIME-Version: 1.0 Message-Id: <20240304-backlight-probe-v1-1-e5f57d0df6e6@linaro.org> References: <20240304-backlight-probe-v1-0-e5f57d0df6e6@linaro.org> In-Reply-To: <20240304-backlight-probe-v1-0-e5f57d0df6e6@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=1176; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=L1gsWac4GlPBRR3BJYIkKHgN/RCN5L6+vXyGAdt7/+A=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5Z5hj0XQi7kaF+7e81MFcwlKfdVr65vaHpPDi MjsbG2Is3OJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZeWeYQAKCRDBN2bmhouD 1ygRD/938KcTcARGYikW/nyTzAfcX6ZC3q6UvmWTsLjqnFXltYckmIM/zt+gzWek4+bhQ9S1KS7 Qmd2iAiCs6EU8ne7ebg+KIqQO44shqs+JFKqcyukBmdZ5f3P9ijrQk45S6KhhX0Z6PPohIoi98W GvTvFNX35xb/bjClwx8vtCuk8hJo6PolwiWsStWd2eenHGpk3qbOIiLVSV/NeF4TOsyVWpkNpET 9BaDnLv0gBXAePVN6cy9mRLzD5JmzucY8gGBktV+zPhsbpNrTBDOJ/TNiydgwTxSVnJ+q24kWkl saS6lwMG7z2+0bfaiYCq/Aw+MicguWKUDtkyBTa2qqvmhYpP1URYMiOmjk2+aq1t/fpHJuvqrP5 BhpZUHSlr+ck2ZbOJ2ckKXJ5SN3E1gVNVBYieebwzJ8G5m3mXZBKqOOvfQNMeSNfclN94ICR2QL nQIXGnO9EV/OwjRtKLapX9M5FYXsGLYvjXSpP+Af3WU6JHlkhnjGTOSnFBEWujD5yINuJJEF5/a qqopAv0qk5pujRsYiT85L6ZtryQOrZjznB6t3TdaO4dWZPnx8TcRSDulZLen4+WD7vcwUlw3yQl L+GrxwPMuZbqP03xEch1aBS3qvs+KFKTbyngpjIdSk7pFs8yUL+CTQ8q4+egzW+n9eEhvoBjZiB UtT5J0qdAwvwdTA== 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 --- 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..9f960f853b6e 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), + "Error: The gpios parameter is missing or invalid.\n"); memset(&props, 0, sizeof(props)); props.type = BACKLIGHT_RAW; From patchwork Mon Mar 4 10:11:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13580351 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 D7FC8C48BF6 for ; Mon, 4 Mar 2024 10:12:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 38E1210FF30; Mon, 4 Mar 2024 10:12:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="LDE7vJkM"; dkim-atps=neutral Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6DFB010FF32 for ; Mon, 4 Mar 2024 10:11:57 +0000 (UTC) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a26fa294e56so735215766b.0 for ; Mon, 04 Mar 2024 02:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709547115; x=1710151915; 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=N1FwEFy+Dl2uRsNArjy2my0aFqui23Xcgx08mwBp3cc=; b=LDE7vJkMF3woV4UZxSJXKCNURmpxB/cdrtg42rmrGgzajFm77S2s9Gr84RbcCv/A97 ZqWKWfSpEd8wjp6UWB1lV5Pa9lVNdJWU2yJhPdAEc4692UUEj9DrsqjjemhRLupITV+t H/QfnymtqJjxBG/QqmKXk0ruDg8vVP85T6g1U6jt8tdF0x5Rb1wFQfpaogxeJTlbgrQu o0qUepxHYsQm09N8CS38IKGmjtl+mKTJZUDRlKVG5YBuvO/i9f62bz0zXgw+vh+pXY7o 3321QKrixkSSZsxHgvhd8mqdvuO9j7Vj6PGXAcCJVVFgSwR/bzo/0EQOO8xoLF0tIKgy a0Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709547115; x=1710151915; 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=N1FwEFy+Dl2uRsNArjy2my0aFqui23Xcgx08mwBp3cc=; b=oAlzni9mPSntcSK/dH9n8ZE8SBx+0M6m9QeDQbaQ9EmcbB0A97zbLKAyynvNuDzpNP zlHbtymN2M2kw9OA5jNGo8JoCEER2P97u44BPvcdJ3TgtpllT9lrXNE9ULWERf9WR0tw Gi9ESel+PyNf1aj1MDcALJgGHPj6/4zAn5vpghz/ZocF75Su5HgtmOQ0qIzpMZvU5JKi Pvz8nXuIcEP/Sw52C+9Ow/OdMMEHjqnWApZbHnJ9GmRVEzj5S8dWu72NNxWY4ZzFg4bq pm4pOjJFKAN+/yJGK3qiClwkHrd+94i0QBun18jBcBrBIO+Z5KWcCA0VWnXaz5p+laLB 6Ssg== X-Gm-Message-State: AOJu0Yx01vpxnT5gAiokZbPiAHzlW1sjm+PQsIWwJXWa1BFmYX7fF6AL lRYyYgdRxYjFB5GzSQpiM456vn+uu8M0FWlCkcdshvZY+FjMzSk4ManYLCOMquU= X-Google-Smtp-Source: AGHT+IH5cQu1xy1LVdK9PUSdHoyXXpoj3l3x8HX5st0puZSlq08NTx/d1VXHsfxHoA9L7M5NJzXQBg== X-Received: by 2002:a17:906:f0d0:b0:a44:6b6b:bae3 with SMTP id dk16-20020a170906f0d000b00a446b6bbae3mr6905807ejb.59.1709547115593; Mon, 04 Mar 2024 02:11:55 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id ef11-20020a17090697cb00b00a44bc99cd89sm2938481ejb.42.2024.03.04.02.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 02:11:55 -0800 (PST) From: Krzysztof Kozlowski Date: Mon, 04 Mar 2024 11:11:39 +0100 Subject: [PATCH 2/7] backlight: l4f00242t03: Simplify with dev_err_probe() MIME-Version: 1.0 Message-Id: <20240304-backlight-probe-v1-2-e5f57d0df6e6@linaro.org> References: <20240304-backlight-probe-v1-0-e5f57d0df6e6@linaro.org> In-Reply-To: <20240304-backlight-probe-v1-0-e5f57d0df6e6@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=2430; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=NY6ffh05b3e06y7LUri3yhspGUFjPVtoTn9TDh5HN+Q=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5Z5iGhsKCRV6SnmJLcxk3l63l/2wXkWX0mqPw FqUYp3+MCCJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZeWeYgAKCRDBN2bmhouD 1384D/94qBZqd0L96f/YTCIfX+UGorHT6vsSGWZKBQDglVcQtd+W2q9z5FyqxQRpgTRGNrrJaJr 4XwBT0yhzuONJj8YysOc6z01URhYjs+1rTh0qxQ+1RO8iepYCX2CIcmi5mDsnwLLmcarlNY+Bzs P4DnCKWECInNTkU8k5gOHSfMEwr1ZI1pF8F927yg/9LQ6cpdwhkQhj89oCzr4riJg6w32dyIMZw IdJzS9rHxaGQNPW22klHxPxlE5L3gz3/xpkA3wlGUrD9EtRIoyzdbKUJDuSmIlcED8A0C/ZRXpF gjKj29XREHEOEdWkN4TQER0kkfBpvx+FjPWrfSm+bOs48jgR4JQiB2UMZprxaUUhk8zikuRByC5 u4lL0xzLBoqLmRqQIlybVuN8VESMlgeaw4ipEn0M7QVbvZi09KPsmeXi1RtyfgUF5nmPYDePky+ L3vXzDlQduxOf5bn9F9oRxVOsmGCiHppov0WVudC857+DAkprPcZmFOeoSnnfmkVWJNF3VMWLAX cAeWwpIIonnOJyiRXcOQlAIcsbfa1qZ/0SRkdg+abAPfGLwQ/crRlY2TKxXUBLCuUAkTNyB8mvX 0AdT2K9K8Rzu13mZQdmZ9w+xQ1EFIvkyxf/kgNnILFMpr+BC9TYRP4OF3XpkdfAr5K2b9Bkvkfp LP0YnjvPJA4aPdg== 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/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 Mon Mar 4 10:11:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13580352 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 CA18EC5478C for ; Mon, 4 Mar 2024 10:12:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E034F10FF37; Mon, 4 Mar 2024 10:12:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="DWBCKf3q"; dkim-atps=neutral Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 161E710FF37 for ; Mon, 4 Mar 2024 10:11:59 +0000 (UTC) Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a3ed9cae56fso985896866b.1 for ; Mon, 04 Mar 2024 02:11:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709547117; x=1710151917; 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=Ne2X+cO3epNXe9ln4awOX17bBGBk21696xx6GBwAIpM=; b=DWBCKf3qv9J0mPCC3UWo7aVaFnsb3hPtgc21R/RZXC8hP/2dOS/blAy/lyLJSZwpqo dOYbCd4+a93BcW0PTfaXAn9MySXT28zF4e9o9y0HjEqJojHtBPgHmG220NKVPPvtXAnK NFxV0+OljbA+i+kXRcFAACpnIVLSL7aJImGgzeZWDcibClCmL1arbR1uRSwhWdlYpi9K +lXUBz1l5wt2BqAqQ4Pk1Qw5bj1IbhyPbJTmkc86BZVWSzq7Xx0cLr32j2GZbrB8xVV/ /0Fl19LP14RfIIUalsgPvw7u4hODrOntMbUHJCB65Wj04JvzpcyuXfI1ei0OM/8S5TtB dH1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709547117; x=1710151917; 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=Ne2X+cO3epNXe9ln4awOX17bBGBk21696xx6GBwAIpM=; b=AWsewXnHhOoXkgF3NtCrw1r4EO0VFvioTPwxJJqcx59vRGK35tjCMquDr4f1zopG8K Tf0a/nq5GVIgJEhera41gTs3QsZ8ntu7s+HWIy092LDAjGAoV72vPURezmMiq/Rryj7G iS/BpjYdWavUHT0H8wJs/MhvccwBXMTNWzs89XDzL0+UzKfi6uRr8SErB8/t1oJgBHsX tn68foYQJPkJcsJ18YFkjOD+8lDuLaR7TsUzKgDW1GtG9csKwJ6nfeYTlUVlsiOFHvIK scoCWGLX6fclOLmQc5oEYFAuRfKN6dFO1kiDQF/8tTbW/cun7EIpDXMtd1bwWx7bLCT7 /kdQ== X-Gm-Message-State: AOJu0Yw1q4u05636BvkiaWEeGc4lURwk7lvIAb0dZ+sUnWGgzlSXaNpw 9WUenjHK6flUAREJicWnsUY3oA6YrlFvWdGLK17PVWRibFUWnGRbqTPgYWrC53w= X-Google-Smtp-Source: AGHT+IGVbbGsL8NOOdTcpOF06AVc7bLlOHtxT+CBCYGHBhkmB+OOeSg+PN2omYlET3YAC6IP7dKJ2A== X-Received: by 2002:a17:906:6c97:b0:a45:2cf3:6c65 with SMTP id s23-20020a1709066c9700b00a452cf36c65mr2316877ejr.25.1709547117400; Mon, 04 Mar 2024 02:11:57 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id ef11-20020a17090697cb00b00a44bc99cd89sm2938481ejb.42.2024.03.04.02.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 02:11:56 -0800 (PST) From: Krzysztof Kozlowski Date: Mon, 04 Mar 2024 11:11:40 +0100 Subject: [PATCH 3/7] backlight: bd6107: Handle deferred probe MIME-Version: 1.0 Message-Id: <20240304-backlight-probe-v1-3-e5f57d0df6e6@linaro.org> References: <20240304-backlight-probe-v1-0-e5f57d0df6e6@linaro.org> In-Reply-To: <20240304-backlight-probe-v1-0-e5f57d0df6e6@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=1247; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=oBEkNwxibRPgfDk3iSeQlCR1ZXaxiSrVLWAc+9a0T0g=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5Z5j77gB1Wx0xWhb8EDQs62oL63I8/c7sddDs CC6aYwM7c2JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZeWeYwAKCRDBN2bmhouD 1yAHD/oD63Jj+FaduY3m25CAoOSOqZrt+/dbgU985Nod7ZV2XRRMJEItdueEuA3748jPE6o2Crw iKIWC5h+bsPxgR4zl9V2j19cGWY/+UdpElaCU3a5y6IeK6Gibi1CCSovo+wY3sUvFhe/JPp3Ehu XABYIK8t+C0udLjNPoTi51pdBqNmWcTHa6zZH8B4i+mbImB+4h4wWt7zbKgAd5RBGCeSLDon4y5 UdXbUUQ/M1VobGvTvha2KDdxmCQ0ZuItOTjzQ9eCh7aa071V1uHbF8IHTvLiCdCrQGd099Xc00D A6JyiyJIiOiid0BRh7EC1/kIHHbcXfogpZpcpaSGr8IxAj7bytITyUtMAIetq9D/c5t9Rlp5PAf WHm67lyeJxjyMXrW8BWbN4FeukFR6Qf3WlwEKxTBd8ItB3pvZ9+/LpVhRv7mAI+TST4qKnvoJ+3 8WQlYy571QWu0kYwQfVXIz3gCS1G+lbBlT7pkydCU9TeAlxtjcUUt3W8yehDnRr3lzDlTTsH9wV 7TgX7eMnoNQ+kReZ21Auu/HX88NDWYCNQ7rPs/VT2RckfKP7vn8JdWnc6P4N7yC4kx+mHKuizue mcvUhlAxB57g96zl7F0RVZ7gq5r1WhuKnIogHxHi/ZaCWVJJTSJ2o8AdIvgg9PVbHlvnM769UnO 8X9j3780xbqzNcw== 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(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- 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 Mon Mar 4 10:11:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13580353 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 BC3C8C54E41 for ; Mon, 4 Mar 2024 10:12:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4228810FF38; Mon, 4 Mar 2024 10:12:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="FDThCF4D"; dkim-atps=neutral Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A88C10FF37 for ; Mon, 4 Mar 2024 10:12:00 +0000 (UTC) Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a2f22bfb4e6so701943166b.0 for ; Mon, 04 Mar 2024 02:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709547118; x=1710151918; 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=C7jNpD8JVN2zPECncF/JczEVQcdrOC4+lvPqKzDW3Nk=; b=FDThCF4Dgtzb1E9r8vNDH959okrYMxiLQkz8G7JWnNcLzO3tq++6rs3+7EUB9ARSt8 HOXMsVQ4u8fAPeeMJfcAxq+tofqAu2pPM5SYbnjkXIGRGToBHlaefv4S3IdxdNX287Tj SLMRoC9SgT8wIiGw+lDw32+PTRenrEXu2nTP1BeUTxiWBD5g47UfRWH4NPZJuRg1mp2I NppuMwoe+jeNcJaEqQ/ZpAqZbHsm+AozOcgtDIWUpjr5V0fHRj7dShdvKYmSiObs9Egn esptS/O0JQHa4lxonRjhxYQ3t4gZ46jUfmuSnSvQXNxSJUXGHqAmSm8WaAUa8Fu2SMqr apGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709547118; x=1710151918; 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=C7jNpD8JVN2zPECncF/JczEVQcdrOC4+lvPqKzDW3Nk=; b=sgWcusSmD3Onie/+X/lqiPA7IGmyyvxIOa6rQjxFA1SzQ0vMvQqGqUUOQgzh+giW+C ID0n1cPIKXOjyifdxk0C2IdRyv29LqX0nWKvQSSE0w1T4Ssfm9jktECh9EKVI6gN0E8r QYd4mVFXjDbmtMgGsciYMHa84vpmXUpaX1/pV4nBPCC79aBcpYWtu4QIBBDLyFP/aBp6 hAZ7jv1I425kc8oACiQVXy7puzej4VVtKNIucF5bh6hueEDIsTNgI0mpzAmHaQKL3IIk UBsp5LwwQwfikuaKo5WVdOC5OZ+B7I5WAsapEk2bYiEJveRxSH26j5B0iM8A2r7XdplQ 9KRw== X-Gm-Message-State: AOJu0Yzg3pSeCN66LODFg0RbV7L2diICqkSzVldbrhM1elQt9hG2mUZj dpyHfupyLa5nHSkMPIjR5YhlpWXFwx2TZ6oWAsUF4r7al9NcqsUwO8LSFFCpsrM= X-Google-Smtp-Source: AGHT+IHIKfIPI9q/DWJfY1zams1q9M6IFh+MBVE0LB3ZesWC40W+rYmZ2rQFJmiyAV8Fad1klY2w+A== X-Received: by 2002:a17:906:f759:b0:a45:6251:f8e2 with SMTP id jp25-20020a170906f75900b00a456251f8e2mr895177ejb.7.1709547118705; Mon, 04 Mar 2024 02:11:58 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id ef11-20020a17090697cb00b00a44bc99cd89sm2938481ejb.42.2024.03.04.02.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 02:11:58 -0800 (PST) From: Krzysztof Kozlowski Date: Mon, 04 Mar 2024 11:11:41 +0100 Subject: [PATCH 4/7] backlight: as3711_bl: Handle deferred probe MIME-Version: 1.0 Message-Id: <20240304-backlight-probe-v1-4-e5f57d0df6e6@linaro.org> References: <20240304-backlight-probe-v1-0-e5f57d0df6e6@linaro.org> In-Reply-To: <20240304-backlight-probe-v1-0-e5f57d0df6e6@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=900; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=tYiRyc4GCWh0OQZcegdBJotlKUvQmMppy24vmgOYX4U=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5Z5kf3pCwb8HgUK+ziA6YZsz55ShzwCbPlrjj dMl2yuN1lWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZeWeZAAKCRDBN2bmhouD 1/DiD/9EClVTNg83B4aoTpYk6q3ArcCWKbx42PizR2X6dccHjBKLN0SzFYUPp8ZRWNevidleHfh hupUfnR2wyDAYPVPWV8dJtdgoXjqCxq1y/1koCVZDMh7rajI7WnOkS6+g9z8POlL19KGLVYdi// Namj816X6p+XoGcwG7ns1mStAJdsc/RkT0gkuAN42tg/vREKdLIesdNxqO6PHytr8lr0oL5Qlf2 O8Spa4QNgRt9FIlVFBvPv/UGY2ZlDjhUaPDn+xoIlqoCUN843JiGiAncg6CY+xPxs4XxbyKLFGp k2CSN4qRLf/sdfX4PagBz5wRrLKEkHDITyx0lJZ8K9NiSCWBD5XuJAApZJF81Fdam+7DIoyxPLd MxNndDTpFtHki2BkCFnq4kcOzKukGbR2jN0qBgi8y3H2JKsAdqQO3kgFS7Bec5ltmWT/4Qjtu2k cgw3rNW0c8rrFL/RpfV7mfgnnkB1HTcrv03TWerMJVvtTZlnp2udLIqpvjLsLiFj1Rl6Uy5ugtS aZ7OQgZkXseN2eOnZy3iB6URxjsuYEjwfWQ2pW8y8Y/1L4Sr/qJHZSTPRXKfNNsV19TI7msionx gDk54z5VALicMkbhcQGfaMiLD1bzd2ms0GRYNQ9KOFTFKsIu+56uI6bAXtAnbN2p5NypV/7lJ4w O9o+19pX4CAdJ5Q== 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(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- 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 Mon Mar 4 10:11:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13580354 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 60E1EC5478C for ; Mon, 4 Mar 2024 10:12:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AC8D010FF39; Mon, 4 Mar 2024 10:12:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="i+mzBnNc"; 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 B8F9F10FF38 for ; Mon, 4 Mar 2024 10:12:01 +0000 (UTC) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-55a179f5fa1so6401477a12.0 for ; Mon, 04 Mar 2024 02:12:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709547120; x=1710151920; 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=LCgoEF8+45p8Lp99q3OTs1MMW8tsgAmVbVFGKP9cQEM=; b=i+mzBnNce1NOKg8qoOQI6wEQBFgwmNeaAEoQKwNCskO2nTlLG6evEdXsUKidm0Dpah h1rdUcEPAEHTe1xqdrrijT+4+UPCb99bUYbGb7NpEZQ6QN5KTvAegPiHi46VTbvTHYbU Cz2V1oDuN7j/fDLgucJ/9LfmHNS3f8BfmJAJ3DVsFEL+V6DPnNMjtBuGDEdhUje4OGvx bIAroDHN79EsLSlH4s9RWkAyMlk/NbHT+n6q6v9blq7YCjTY4XfLgjppegckBwCTN06G CL31qDrRAro5bJciAPSokd4fLdfaNVywZmwbh2UkVgGCKh5s2wTvoygKs2TgKAd+aKK9 x3mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709547120; x=1710151920; 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=LCgoEF8+45p8Lp99q3OTs1MMW8tsgAmVbVFGKP9cQEM=; b=n858a1s2d9ghMI5wYXFGD0gZ2/cC94FQPkjvLWTV7kE9gVXdCR6agmFvyYuPy6enMP lbMI2LuEo14Oab7D/SKie8xqYz4KRd8gBJZ2l3jK3o6PDJTs9bne3O9V3pKewbKxdCEN 4tXdZz16aMfpWjvv9LdOmznkXzSe3T5A2rP5GnCXShOwGLgVc0nmc9meFqRfhz8tTR3j IDZ0256NucyGYtTYA7RfhUf/p4xwhtTIDyFVPZowXFEvkeP3fB4YBMJbvPszfNzYo6tB W2SOUP3O5404FUMEUf2GV4rPuoA6jlgeq/k7gE1Eg3hQ7VDjiVzcB8EZ7Arz2XaneQi5 6JXw== X-Gm-Message-State: AOJu0Yyn7PCywSpSYGlxYdLrzyzTfiaS8bPFPwapxSsOIJbt8yEroamS QHKDyGYMrzWHgnctK23ZSxtDBmeoW87yMrB5gNGrU4liPEE0hEbFK1p6Bp81J5E= X-Google-Smtp-Source: AGHT+IHMXps/Sdsau2lL4BC5kTEGautlKze0rWGzpZvXGJF/HaAiRzHSpujG/+PG5cV0scGrNC4GgQ== X-Received: by 2002:a17:906:c318:b0:a45:2b2c:8968 with SMTP id s24-20020a170906c31800b00a452b2c8968mr1743474ejz.20.1709547120032; Mon, 04 Mar 2024 02:12:00 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id ef11-20020a17090697cb00b00a44bc99cd89sm2938481ejb.42.2024.03.04.02.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 02:11:59 -0800 (PST) From: Krzysztof Kozlowski Date: Mon, 04 Mar 2024 11:11:42 +0100 Subject: [PATCH 5/7] backlight: lm3630a_bl: Handle deferred probe MIME-Version: 1.0 Message-Id: <20240304-backlight-probe-v1-5-e5f57d0df6e6@linaro.org> References: <20240304-backlight-probe-v1-0-e5f57d0df6e6@linaro.org> In-Reply-To: <20240304-backlight-probe-v1-0-e5f57d0df6e6@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=1010; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=l2zBfccz8Tq6SqYayq64DiM3PIARxZs9iJsKbpWBrMU=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5Z5k1b8EW68f6XfirNTSL7SEI9ygTM0istLZw TdhuvuJzgCJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZeWeZAAKCRDBN2bmhouD 13BKEACHkxYLvnrmNqz2S2EAVq1squYd3iDN3nmrgGmHzpunYRmnlsYHaCQP1Ne+LT3Rzk/0DT5 2kPItHRavwLGtfzXlkwLcdWIJ4O1tCilY9lQb6KQJG1N9EjK6+Vipl/8WV+iF6plMs25+pTlU/b 0nf9uT/r5IL5cC3Rf+Sg3s7hDFKjeEh0aH78KMaIeMolZlM+QX36Ud6sxRYH4lQcrewimowQ37F BIWqy+6khodGvB7Q+qGPFYLcXGHewXmq2xJjqhlop6PNPMNCwi00HZEodZCENGKrOnSTKLKyd7j kr1Y0UwfHgcnT8G4v+VJum0+eWAnptHxA/FwqhO4AQZTofuq66Y4gDPQTF+OqXheDd2ZFwDJ7JU 78vL843x5VMZVe7AEfJSkfOKhHTOXFr6HyP1klsJ5lY29G454mNYhNyMDN/erwKwx3w7/On3XMQ 5c1r0t7sXFMBBdRJpi+0/JjnEttDlF7acH7BflLiltf6atwGJWjBHKQf55RFYLRofb4Pq2WB24U Wymjysgg61HAlduM+RW7/OFURHUF0JWU81CR/GKmWfT21lmhjUsYGtbkS/qVftIpVhVpBW+xuCy FrdNSxjgUhfOPA9/yU645iXlG+RRMoc4CYG/aWlJyTaAo7Wu0meTzCE7rM+06ZSRWJY/FevD3M/ XJeQstxrm5vdEtA== 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(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- 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 Mon Mar 4 10:11:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13580355 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 CCB3BC54E41 for ; Mon, 4 Mar 2024 10:12:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 073B610FF3A; Mon, 4 Mar 2024 10:12:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ET4hFVwb"; dkim-atps=neutral Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0D87610FF3A for ; Mon, 4 Mar 2024 10:12:03 +0000 (UTC) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a449c5411e1so346070566b.1 for ; Mon, 04 Mar 2024 02:12:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709547121; x=1710151921; 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=LwjyvFJUk04Z9SLWkJyPD6nPLgMovuAGzXog2OSB5eE=; b=ET4hFVwbKGprMSczVkG2U8DGnvdNBqLDA83CAuV2uEk0PnIZ2oHIN80vTR7173Ry7V hJySlJgNb3rs1nsbePfocPKpa1m21611r9CEvjz3GSNw+3Wc13vawVHEfp8XuxfzVOrx EgwHwqlvadELoVMYqN7ctrbRj7Wbb6ipmC0cMWb93WiSFcZse/AdHJLVP//t/oLRxJVM cJUFpWxQO/gS3M08CIVfSwHy/rijJHVsloPSR59diA8gThU9sS7iZPlvqchdZYLJEunt QId1mYbpbcVKA8MreD7olkadPni9OCOZrjaWvLTIsp/wrEFBqrLDSnxrzcanxUfaqIy0 jZCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709547121; x=1710151921; 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=LwjyvFJUk04Z9SLWkJyPD6nPLgMovuAGzXog2OSB5eE=; b=I9yvZ2AnUumJ/4UOoaU0qIPaMkmWDZ5kruzD4KStj32IIoWBJPpSd2+iPXak3v6BDz MsFjhlQM4lcmDgWP2C4Ds6/JRsHM8J+r4e8aBn0xvHhJoIQky3DZ4r4VxRKX7rH5Ec11 z8M/Wa1gQlNW7IBEhvhmijHCV0BiGNbyvgQsOSu5zUi/xDVY2ohpZrbx4qAKmXy5kMNE x2p07pFbl+KN6/l/Sbjqp67E7mz/z+KftqfqMyO39eBfBtjyyGFPkzc5WBdrPVIiyblN bvbNsn6+x4U8p4f+zaLZN+Y/SqM3xwRLpL0aRgPekPD97XtpAGMFruvUcrs02Esm5XML r2Lw== X-Gm-Message-State: AOJu0YzWwD6Zuo5qC8rMTBZKjl4gHOJp285tBkhaHfZu+KpEIbexv0D5 yY3Gei5zZ+u0NqsXGtjOmhhA045InoYPw+fWc5qUACWMl/fQaJsyhfSSy2HShRU= X-Google-Smtp-Source: AGHT+IFUzjedvr/C84chcdr3/bRdz0Po8+qn9pjVm/iLXEGelmIh6PIw2Cts9hyPI3is7lGZn4Uqbg== X-Received: by 2002:a17:906:d20a:b0:a3f:c006:f141 with SMTP id w10-20020a170906d20a00b00a3fc006f141mr5347674ejz.62.1709547121499; Mon, 04 Mar 2024 02:12:01 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id ef11-20020a17090697cb00b00a44bc99cd89sm2938481ejb.42.2024.03.04.02.12.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 02:12:01 -0800 (PST) From: Krzysztof Kozlowski Date: Mon, 04 Mar 2024 11:11:43 +0100 Subject: [PATCH 6/7] backlight: lm3630a_bl: Simplify probe return on gpio request error MIME-Version: 1.0 Message-Id: <20240304-backlight-probe-v1-6-e5f57d0df6e6@linaro.org> References: <20240304-backlight-probe-v1-0-e5f57d0df6e6@linaro.org> In-Reply-To: <20240304-backlight-probe-v1-0-e5f57d0df6e6@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=902; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=pd2WBlK2PnnolkSqpfShUm10rFxXfMK9JJcdv/+/o+8=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5Z5lXJ/VFjg/mpbVkfSabBfIk9lZsDYAkyfe/ D+nlFwxH7iJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZeWeZQAKCRDBN2bmhouD 11j9D/40TMnoJeYnOPMbLd5xVtL3dXUyBwE62gtbjuZcDCQVRF6H312FNVRBLVT7r2af2vQUh1f 17GF0ogLebzfS7zgk8oEakUcVhkyq75oe02QLqCD6dNLu3sqeDVVW3e9Fqj0sb0UeaSHmaoWJ7+ bP36HaSjz6gKYGqCuRQDiXSAed5uhxEW+B2cx7tyuE1j9IbyXs3WPZiyimbEYPiGXMrcg2byaOM Z+lNdioUPzs/fdMNLFlGD2DLdBHf4MlasTvQK4MCkk1CtF4KqnyqDMkKDJtOxTrzfz4FIJ8KLVR oLFviGSGKBbwMWywSjHw5aYh0guqG7i+RpAsh0fCQzShk8jZEiJAFJuvvyIGiz/XwGD2zyIyduy BIvF9Oaco7OeswzIqZ6Wb9+xBUahYeESyrNthUD+xFaynrVx9KxONqkL9l94IyFNqUWMp2+SREO aMG5K4viwKrtcjepKKRHZMdds0uNiE4HC0qqocxELok9nQ9lpjifoeVULxwx5HTE3hw0ub41Q4Y um9RLtNuSP4cn9IWYcrVJ78ZEP9LAcef2DwfCpR/lEdtqDV2dDiFni1Yt/b6VgacmVbyvBaUld7 Po0f1M2DCrEH7UPbHXYgXCfhZ+B1Bp/XKFsDmz1UgsRVFJ54UfUCo8RJnzySYQOPTSmGT5HOudB o90wSGxwVpTTALQ== 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. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- 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 Mon Mar 4 10:11:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13580356 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 18D4BC5478C for ; Mon, 4 Mar 2024 10:12:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B4CE10FF3B; Mon, 4 Mar 2024 10:12:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="NXwAoybP"; dkim-atps=neutral Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF6D210FF3A for ; Mon, 4 Mar 2024 10:12:04 +0000 (UTC) Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a45670f9508so56166766b.0 for ; Mon, 04 Mar 2024 02:12:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709547123; x=1710151923; 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=qkscxkyuLKmNGJ13PCRB5gPU2riBC6Uyvc9FkqhiTrI=; b=NXwAoybPf/aaUJdA7uVLvz6bxwAmShLLyJfC2Cf6wzK976aOkatQSwpF8nS00USkmm PuPAEHb6YJWq+KLC0lhlxIek7Z4vfrs22hcxW5q1u/Mi1zOKkmQ20b78AFBXnK+SXTkM h6jgatOI0h2fDJ8Q23u+x+1ovahq9QwVssCvjOhslr0sX/bt2DbGnD78rGDCc9xMMn5O ezvqtwm6bGy3Y0l+ZazrgGuOhiGa0gmHSNLPIyTKVvopUgJ/z9MtZE9Unnl2DkdSwPq/ KjBzsm2D+5sVhTiR6rR/nIX+HIEuYxPQnNwRIbF4Cas6onqpzRzc2/mtjjXJEeWxT5O6 lw1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709547123; x=1710151923; 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=qkscxkyuLKmNGJ13PCRB5gPU2riBC6Uyvc9FkqhiTrI=; b=XiT3gBPrcgISBXQOwSDmM7P+qTbrQVBvlYaglmnc9AWIq7J+nDXpOES50byCAOMC6m Lb2KNbb8XQQYj9/nZPx5AAXT/ssbht0Cagiu2TOVYy1jQ0DH0UdvczX7faTI9cHyRS0I tGU/O2NGbCskFptm9fNwnvreuSZnbyrFm9T48NzNmiRF4Y07OOXj1l/bxokWfg/vNoUE Kzd65ob3KvK2MYZlXFWhWkuPCxJxPRcsqTNXwfqCA1uFIccLFiR6EdAXwSqIFGgJiCfd p8BNIFGxIu1VcghOhukYNK0LBY/HdD2h4HkTpbSP1ieUgHECKvH9ug2Kw9a5D6Y6k3fT dDnw== X-Gm-Message-State: AOJu0YxJHol2307Ns5Ag0kSXbWHROqc1jKlsIAGDstMdqYJ5iKABaGAN NIoXgTSIPjudfxl4cvgDuWXT0CGNokOEzeEI88LINysZ8TVN1UiQkHBF1KBFZVWzZV+5LeqhL/E O X-Google-Smtp-Source: AGHT+IGrR48vptQZf+rBErBNW3zRh8A4eRQbm5RBoTdBYRzBDUp2kfXMSXqolT28sPSNVPFt+B9itg== X-Received: by 2002:a17:906:1c90:b0:a44:86d4:70a1 with SMTP id g16-20020a1709061c9000b00a4486d470a1mr5679948ejh.59.1709547123118; Mon, 04 Mar 2024 02:12:03 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id ef11-20020a17090697cb00b00a44bc99cd89sm2938481ejb.42.2024.03.04.02.12.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 02:12:02 -0800 (PST) From: Krzysztof Kozlowski Date: Mon, 04 Mar 2024 11:11:44 +0100 Subject: [PATCH 7/7] backlight: pandora_bl: Drop unneeded ENOMEM error message MIME-Version: 1.0 Message-Id: <20240304-backlight-probe-v1-7-e5f57d0df6e6@linaro.org> References: <20240304-backlight-probe-v1-0-e5f57d0df6e6@linaro.org> In-Reply-To: <20240304-backlight-probe-v1-0-e5f57d0df6e6@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=861; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=IQiBIX1ptsqUCh17mmsk9JR1+iQzH5+7RhWBq7Lbzeo=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5Z5mnfBQ5T6LEu6wSHreyeIddxcFaUtThG5hR a7P7xtBFQOJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZeWeZgAKCRDBN2bmhouD 1+bBEACC1mknggxkpb8buuVG+0wI2sOUPaDlTNanVp8VneZ1l/BNkKBQ16feuUhfuQwjRbtWsUf ZuSeoXHhpFP4r86SdVkbEVDk2lHP0KnDRoyq62CN2cvKV/jH1gOV+dRRjQwaQ/+1O2GMx0mPbDu iaqhbqb5oqrns4Ycj+pUyBUD0pjID8r0TnOsriFXB2OKlIj30CaBhcaq8P6ChS8t7bP6qgDjSqs jUOVa9GFE0IiX7CJhIBtOO7Uk6GaQ12WeQxZuikLzwrGgiv9PCvohPt6a9xgmqEyDchFF/V+IwX SXAHRzQdkez8EzzNYFlwKbaRtTOzF9uPqZvzLJowH+HXPrBowr7kCJ0XlBosRMxlNkeGPjGC8zF klwHa4J6M4rQnL27yx8qzkeaTjuHw2OCKdyrBEFikRSKRNWw0tVjgKWdmMJ5uP7LXnLGxiK330C UbwI0ZPdFqScbrPDf83rLA0+DP+abdH2Wr9o0vbFTuEW8NxPwqys23rwj29dj7O3Hdw5okM306X kMaeqS5zhQ0Oq8XJrf6wUIGnGJkLS9anoWh5FJTS+xQWg0V4kfM1v3bc7klOT2G67xTXllFT3gG TAkA+gLn74eZZxkaYbAwdLovsbQnn1Ey7Zoui+W7wRwR8NgCwbgKmETXcsNMbdkRGvXyAstq/Sh X7Mj1VxLbKE+uxg== 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. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- 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;