linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier.adi@gmail.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: linux-kernel@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] Backlight: Add backlight type
Date: Thu, 9 Sep 2010 12:59:33 -0400	[thread overview]
Message-ID: <AANLkTinD82aK3BWe8JXiF_hHBzH3e=k8ncFpGdUZ2edE@mail.gmail.com> (raw)
In-Reply-To: <1283963539-4039-1-git-send-email-mjg@redhat.com>

On Wed, Sep 8, 2010 at 12:32, Matthew Garrett <mjg@redhat.com> wrote:
> There may be multiple ways of controlling the backlight on a given machine.
> Allow drivers to expose the type of interface they are providing, making
> it possible for userspace to make appropriate policy decisions.

maybe i missed something, but i dont see the core validating the .type
value at registration time.  since the value is then used later as an
index into an array, shouldnt it verify that it is valid ?

do you want to force everyone to declare they're "raw" ?  or just go
with the memset default to have people start with "raw" ?  otherwise
it might make sense to have the first enum be BACKLIGHT_UNKNOWN and
have the core warn when it hits that.

> --- a/drivers/video/backlight/backlight.c
> +++ b/drivers/video/backlight/backlight.c
>
> +static const char *backlight_types[] = {
> +       [BACKLIGHT_RAW] = "raw",
> +       [BACKLIGHT_PLATFORM] = "platform",
> +       [BACKLIGHT_FIRMWARE] = "firmware",
> +};

const char * const backlight_types[] ?
-mke

  parent reply	other threads:[~2010-09-09 16:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 16:32 [PATCH] Backlight: Add backlight type Matthew Garrett
2010-09-08 16:32 ` [PATCH] i915: Add native backlight control Matthew Garrett
2010-09-09 17:09   ` [Intel-gfx] " Chris Wilson
2010-09-09 17:14     ` Matthew Garrett
2010-09-10 13:38   ` [PATCH] drm/i915: Expose a native backlight device Chris Wilson
2010-09-10 13:47     ` Matthew Garrett
2010-09-08 16:32 ` [PATCH] radeon: Expose backlight class device for legacy LVDS encoder Matthew Garrett
2010-09-08 16:58   ` Alex Deucher
2010-09-08 17:03     ` Matthew Garrett
2010-09-08 17:04       ` Alex Deucher
2010-09-13  7:54   ` Michel Dänzer
2010-09-15 11:38     ` Michel Dänzer
2010-09-09 16:59 ` Mike Frysinger [this message]
2010-11-15 15:48 ` [Intel-gfx] [PATCH] Backlight: Add backlight type Matthew Garrett
2010-11-15 16:44   ` Jesse Barnes
2011-03-24  6:53     ` Mike Frysinger
2011-03-24  7:13       ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinD82aK3BWe8JXiF_hHBzH3e=k8ncFpGdUZ2edE@mail.gmail.com' \
    --to=vapier.adi@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=rpurdie@rpsys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).