[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d5443650902252305h6e221b4epd724d8331607eebb@mail.gmail.com>
Date: Thu, 26 Feb 2009 12:35:45 +0530
From: Trilok Soni <soni.trilok@...il.com>
To: Kyungmin Park <kmpark@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
dmitry.torokhov@...il.com, rpurdie@...ys.net
Subject: Re: [PATCH] LED key trigger support
Hi Kyungmin,
> +
> +static int key_notifier_callback(struct notifier_block *nb,
> + unsigned long event, void *data)
> +{
> + struct key_trigger_notifier *kn = container_of(nb,
> + struct key_trigger_notifier, notifier);
> + struct led_classdev *led = kn->led;
> + unsigned int *key_value = (unsigned int *) data;
No need of casting from void *.
> +
> + /* In case of touchscreen, just skip it */
> + if (*key_value == BTN_TOUCH)
> + return 0;
I think this filtering is already done by notification patch.
> +
> + led_set_brightness(led, event);
> + return 0;
> +
> +}
> +
> +static void key_led_activate(struct led_classdev *led)
> +{
> + struct key_trigger_notifier *kn;
> + int ret;
> +
> + kn = kzalloc(sizeof(struct key_trigger_notifier), GFP_KERNEL);
> + if (!kn) {
> + dev_err(led->dev, "unable to allocatate key trigger\n");
s/allocatate/allocate
--
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists