Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Nov 2021 09:12:44 GMT
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 7785ea337373 - stable/13 - gpioled: allow the driver to be disabled via fdt
Message-ID:  <202111130912.1AD9Cibl078509@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/src/commit/?id=7785ea33737369ea6e204a34e8300d5d2a090ab4

commit 7785ea33737369ea6e204a34e8300d5d2a090ab4
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2020-09-25 07:32:47 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-11-13 09:12:36 +0000

    gpioled: allow the driver to be disabled via fdt
    
    (cherry picked from commit 832503063e32a449f8ed6ecf865d01e575559971)
---
 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?202111130912.1AD9Cibl078509>