From owner-svn-src-all@FreeBSD.ORG Thu Aug 30 23:54:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C765106564A; Thu, 30 Aug 2012 23:54:50 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26FCA8FC08; Thu, 30 Aug 2012 23:54:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7UNsoXH033974; Thu, 30 Aug 2012 23:54:50 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7UNsndS033971; Thu, 30 Aug 2012 23:54:49 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201208302354.q7UNsndS033971@svn.freebsd.org> From: Justin Hibbits Date: Thu, 30 Aug 2012 23:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239929 - stable/9/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 23:54:50 -0000 Author: jhibbits Date: Thu Aug 30 23:54:49 2012 New Revision: 239929 URL: http://svn.freebsd.org/changeset/base/239929 Log: MFC r239548: 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. Modified: stable/9/sys/powerpc/powermac/atibl.c stable/9/sys/powerpc/powermac/nvbl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/powermac/atibl.c ============================================================================== --- stable/9/sys/powerpc/powermac/atibl.c Thu Aug 30 23:50:11 2012 (r239928) +++ stable/9/sys/powerpc/powermac/atibl.c Thu Aug 30 23:54:49 2012 (r239929) @@ -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); } Modified: stable/9/sys/powerpc/powermac/nvbl.c ============================================================================== --- stable/9/sys/powerpc/powermac/nvbl.c Thu Aug 30 23:50:11 2012 (r239928) +++ stable/9/sys/powerpc/powermac/nvbl.c Thu Aug 30 23:54:49 2012 (r239929) @@ -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)