lkml.org 
[lkml]   [2009]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 8/8] Loongson: YeeLoong: add input/hotkey driver
Hi Wu,

On Sun, Dec 06, 2009 at 03:01:48PM +0800, Wu Zhangjin wrote:
> +
> +#define EC_VER_LEN 64
> +
> +static int black_screen_handler(int status)
> +{
> + char *p, ec_ver[EC_VER_LEN];
> +
> + p = strstr(loongson_cmdline, "EC_VER=");
> + if (!p)
> + memset(ec_ver, 0, EC_VER_LEN);
> + else {
> + strncpy(ec_ver, p, EC_VER_LEN);
> + p = strstr(ec_ver, " ");
> + if (p)
> + *p = '\0';
> + }
> +

Hmm, why do you copy and parse command lineinstead of using module
param and also doing it just once?

> + /* Seems EC(>=PQ1D26) does this job for us, we can not do it again,
> + * otherwise, the brightness will not resume to the normal level! */
> + if (strncasecmp(ec_ver, "EC_VER=PQ1D26", 64) < 0)
> + yeeloong_lcd_vo_set(status);
> +
> + return status;
> +}

Thanks.

--
Dmitry


\
 
 \ /
  Last update: 2009-12-07 07:51    [W:0.080 / U:3.852 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site