diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2012-08-21 23:55:29 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2012-08-21 23:55:29 +0000 |
commit | 02bfab306ebdc4d68b465197036bef8126673ca3 (patch) | |
tree | bff2ab865cd21deb5a2fafdb72c08a38d52ffad0 /sys/powerpc | |
parent | e306c6c16020fa5994f6ebb3853920ed5ae557f6 (diff) | |
download | FreeBSD-src-02bfab306ebdc4d68b465197036bef8126673ca3.zip FreeBSD-src-02bfab306ebdc4d68b465197036bef8126673ca3.tar.gz |
phandle_t is unsigned, and OF_finddevice() returns (phandle_t)(-1) on
failure, so check for that instead of 0.
While here, provide a better description for ATI backlight driver.
Reported by: jchandra@
MFC after: 3 days
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/powermac/atibl.c | 4 | ||||
-rw-r--r-- | sys/powerpc/powermac/nvbl.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/powerpc/powermac/atibl.c b/sys/powerpc/powermac/atibl.c index ff26dfe..fff76d0 100644 --- a/sys/powerpc/powermac/atibl.c +++ b/sys/powerpc/powermac/atibl.c @@ -98,7 +98,7 @@ atibl_probe(device_t dev) handle = OF_finddevice("mac-io/backlight"); - if (handle <= 0) + if (handle == -1) return (ENXIO); if (OF_getprop(handle, "backlight-control", &control, sizeof(control)) < 0) @@ -107,7 +107,7 @@ atibl_probe(device_t dev) if (strcmp(control, "ati") != 0) return (ENXIO); - device_set_desc(dev, "PowerBook backlight"); + device_set_desc(dev, "PowerBook backlight for ATI graphics"); return (0); } diff --git a/sys/powerpc/powermac/nvbl.c b/sys/powerpc/powermac/nvbl.c index 3317075..1f89881 100644 --- a/sys/powerpc/powermac/nvbl.c +++ b/sys/powerpc/powermac/nvbl.c @@ -94,7 +94,7 @@ nvbl_probe(device_t dev) handle = OF_finddevice("mac-io/backlight"); - if (handle <= 0) + if (handle == -1) return (ENXIO); if (OF_getprop(handle, "backlight-control", &control, sizeof(control)) < 0) |