Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Nov 2021 17:21:12 GMT
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 832503063e32 - main - gpioled: allow the driver to be disabled via fdt
Message-ID:  <202111061721.1A6HLC9c087161@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=832503063e32a449f8ed6ecf865d01e575559971

commit 832503063e32a449f8ed6ecf865d01e575559971
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2020-09-25 07:32:47 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-11-06 17:21:05 +0000

    gpioled: allow the driver to be disabled via fdt
---
 sys/dev/gpio/gpioled_fdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/dev/gpio/gpioled_fdt.c b/sys/dev/gpio/gpioled_fdt.c
index 3f627706860a..58bcd0fbd2bb 100644
--- a/sys/dev/gpio/gpioled_fdt.c
+++ b/sys/dev/gpio/gpioled_fdt.c
@@ -144,6 +144,8 @@ gpioleds_detach_led(struct gpioled *led)
 static int
 gpioled_probe(device_t dev)
 {
+	if (!ofw_bus_status_okay(dev))
+		return (ENXIO);
 	if (!ofw_bus_is_compatible(dev, "gpio-leds"))
 		return (ENXIO);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111061721.1A6HLC9c087161>