lkml.org 
[lkml]   [2009]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] LED key trigger support
From
On Thu, Feb 26, 2009 at 4:05 PM, Trilok Soni <soni.trilok@gmail.com> wrote:
> 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.

No, touchscreen also use input_report_key function so it passed BTN_TOUCH value.
I don't want to key led blink at touchscreen.
>
>> +
>> +       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

Sorry for typo, I will fix it.

Thank you,
Kyungmin Park
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-02-27 03:15    [W:0.044 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site