mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Januszewski <spock@gentoo.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] uvesafb: improve parameter handling.
Date: Mon, 30 Mar 2009 22:15:54 +0200	[thread overview]
Message-ID: <5d9b736f0903301315n590edc81k1a4aa02f305b80ff@mail.gmail.com> (raw)
In-Reply-To: <200903282354.22331.rusty@rustcorp.com.au>

On Sat, Mar 28, 2009 at 15:24, Rusty Russell <rusty@rustcorp.com.au> wrote:
>
> 1) Now module_param(..., invbool, ...) requires a bool, and similarly
>   module_param(..., bool, ...) allows it, change pmi_setpal to a bool.
> 2) #define param_get_scroll to NULL, since it can never be called (perm
>   argument to module_param_named is 0).
> 3) Return -EINVAL from param_set_scroll if the value is bad, so it's
>   reported.
>
> Note that I don't think the old fb_get_options() is required for new
> drivers: the parameters automatically work as uvesafb.XXX=... anyway.
>
> Cc: Michal Januszewski <spock@gentoo.org>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Acked-by: Michał Januszewski <spock@gentoo.org>

> ---
>  drivers/video/uvesafb.c |   10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
> --- a/drivers/video/uvesafb.c
> +++ b/drivers/video/uvesafb.c
> @@ -45,7 +45,7 @@ static int mtrr               __devinitdata = 3; /* e
>  static int mtrr                __devinitdata = 3; /* enable mtrr by default */
>  static int blank       = 1;               /* enable blanking by default */
>  static int ypan                = 1;             /* 0: scroll, 1: ypan, 2: ywrap */
> -static int pmi_setpal  __devinitdata = 1; /* use PMI for palette changes */
> +static bool pmi_setpal __devinitdata = true; /* use PMI for palette changes */
>  static int nocrtc      __devinitdata; /* ignore CRTC settings */
>  static int noedid      __devinitdata; /* don't try DDC transfers */
>  static int vram_remap  __devinitdata; /* set amt. of memory to be used */
> @@ -2009,11 +2009,7 @@ static void __devexit uvesafb_exit(void)
>
>  module_exit(uvesafb_exit);
>
> -static int param_get_scroll(char *buffer, struct kernel_param *kp)
> -{
> -       return 0;
> -}
> -
> +#define param_get_scroll NULL
>  static int param_set_scroll(const char *val, struct kernel_param *kp)
>  {
>        ypan = 0;
> @@ -2024,6 +2020,8 @@ static int param_set_scroll(const char *
>                ypan = 1;
>        else if (!strcmp(val, "ywrap"))
>                ypan = 2;
> +       else
> +               return -EINVAL;
>
>        return 0;
>  }
>
>

      reply	other threads:[~2009-03-30 20:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-28 13:24 Rusty Russell
2009-03-30 20:15 ` Michal Januszewski [this message]

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=5d9b736f0903301315n590edc81k1a4aa02f305b80ff@mail.gmail.com \
    --to=spock@gentoo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®