From patchwork Tue Feb 18 18:55:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Kettenis X-Patchwork-Id: 3674151 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4E60B9F2EC for ; Tue, 18 Feb 2014 18:55:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 508DC201D3 for ; Tue, 18 Feb 2014 18:55:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2FD55201CD for ; Tue, 18 Feb 2014 18:55:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 46037FAB7C; Tue, 18 Feb 2014 10:55:50 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from glazunov.sibelius.xs4all.nl (sibelius.xs4all.nl [83.163.83.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 77FF8FAB7C for ; Tue, 18 Feb 2014 10:55:48 -0800 (PST) Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id s1IItkET027728; Tue, 18 Feb 2014 19:55:46 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id s1IItjEZ005579; Tue, 18 Feb 2014 19:55:46 +0100 (CET) Date: Tue, 18 Feb 2014 19:55:46 +0100 (CET) Message-Id: <201402181855.s1IItjEZ005579@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: chris@chris-wilson.co.uk In-reply-to: <20140218080636.GB11611@nuc-i3427.alporthouse.com> (message from Chris Wilson on Tue, 18 Feb 2014 08:06:36 +0000) References: <201402152029.s1FKTgQk017457@glazunov.sibelius.xs4all.nl> <20140218080636.GB11611@nuc-i3427.alporthouse.com> Cc: intel-gfx@lists.freedesktop.org, mark.kettenis@xs4all.nl Subject: Re: [Intel-gfx] [PATCH] xf86-video-intel: Unbreak build on OpenBSD X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP > Date: Tue, 18 Feb 2014 08:06:36 +0000 > From: Chris Wilson > > On Sat, Feb 15, 2014 at 09:29:42PM +0100, Mark Kettenis wrote: > > Fallout from the backlight helper changes. > > Apologies for missing this earlier. I have rearranged the code once > again to try to push the OpenBSD specifics down into src/backlight.c, > can you please check what needs to be fixed up now? No worries. Here's a new diff against master. diff --git a/src/backlight.c b/src/backlight.c index 688819d..3c3f152 100644 --- a/src/backlight.c +++ b/src/backlight.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -71,13 +72,14 @@ #ifdef __OpenBSD__ #include +#include int backlight_set(struct backlight *b, int level) { struct wsdisplay_param param; if (b->iface == NULL) - return; + return -1; if ((unsigned)level > b->max) level = b->max; @@ -129,6 +131,14 @@ int backlight_open(struct backlight *b, char *iface) return param.curval; } +enum backlight_type backlight_exists(const char *iface) +{ + if (iface != NULL) + return BL_NONE; + + return BL_PLATFORM; +} + #else static int