Bug 99833 - src/backlight.c only defines __backlight_exists one branch of #ifdef HAVE_DEV_WSCONS_WSCONSIO_H
Summary: src/backlight.c only defines __backlight_exists one branch of #ifdef HAVE_DEV...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) NetBSD
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-16 07:29 UTC by David Shao
Modified: 2017-02-16 07:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to restore previous use of backlight_exists (301 bytes, text/x-csrc)
2017-02-16 07:29 UTC, David Shao
no flags Details

Description David Shao 2017-02-16 07:29:15 UTC
Created attachment 129660 [details]
Patch to restore previous use of backlight_exists

commit	b24e7581bd1e5a0215cb73ec87093ebf03c20278
"backlight: Factor known names into preferred interfaces"
from 2015-06-17
defines in project xf86-video-intel, file src/backlight.c,

static int __backlight_exists(const char *iface)

only in one half, the #else branch, of
#ifdef HAVE_DEV_WSCONS_WSCONSIO_H
Then function __backlight_exists() is used after the #endif in

char *backlight_find_for_device(struct pci_device *pci)

This problem was detected using pkgsrc-wip xf86-video-intel
on current NetBSD amd64, which uses a git snapshot of xf86-video-intel.

Attached is a patch that replaces the use of __backlight_exists
with the previously used function backlight_exists().
Comment 1 Chris Wilson 2017-02-16 07:39:36 UTC
commit 860c3664fe79c1fe92095ff345068f1fc7e4e651
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Feb 16 07:36:22 2017 +0000

    backlight: Provide backlight_find_for_device() stub for BSD
    
    BSD implements a single backlight controller interface and doesn't need
    the sysfs searching of Linux. Just report that there is no per-device
    backlight to fallback to using the ioctl (and in the process avoid
    calling undefined functions inside the BSD block).
    
    Reported-by: David Shao <davshao@gmail.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99833


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.