Re: [PATCH 1/2] backlight: hx8357: switch to using gpiod API

From
Daniel Thompson <hidden>
Date
2023-02-07 16:05:05
Also in
dri-devel, lkml
Reply to
Dmitry Torokhov, 2023-02-07
On Mon, Feb 06, 2023 at 08:15:56PM -0800, Dmitry Torokhov wrote:
On Mon, Feb 06, 2023 at 11:35:32AM +0000, Daniel Thompson wrote:
quoted
On Tue, Jan 31, 2023 at 02:57:06PM -0800, Dmitry Torokhov wrote:
quoted
+				dev_info(&spi->dev, "im gpio[%d] is not here yet, deferring the probe\n",
+					 i);
+			} else {
+				dev_err(&spi->dev, "failed to request im gpio[%d]: %d\n",
+					i, ret);
 			}
These last two clauses should be updated to return dev_err_probe(...)
instead.

With that change:
Reviewed-by: Daniel Thompson <redacted>
So you want to actually suppress the deferral message unless debug
printks are enabled? So you want this to read:


		if (ret) {
			if (ret == -ENOENT) {
				if (i == 0)
					break;

				dev_err(&spi->dev, "Missing im gpios[%d]\n", i);
				return -EINVAL;
			}

			return dev_err_probe(&spi->dev, ret,
					     "failed to request im gpio[%d]\n", i);
		}

Did I get it right?
LGTM.


Daniel.
Thread (6 messages) 6 messages, 2 authors, last reply 2023-02-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help