linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trilok Soni <soni.trilok@gmail.com>
To: Kyungmin Park <kmpark@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	dmitry.torokhov@gmail.com, rpurdie@rpsys.net
Subject: Re: [PATCH] LED key trigger support
Date: Thu, 26 Feb 2009 12:35:45 +0530	[thread overview]
Message-ID: <5d5443650902252305h6e221b4epd724d8331607eebb@mail.gmail.com> (raw)
In-Reply-To: <20090225093440.GA5414@july>

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-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-02-26  7:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25  9:34 [PATCH] LED key trigger support Kyungmin Park
2009-02-26  7:05 ` Trilok Soni [this message]
2009-02-27  2:13   ` Kyungmin Park

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=5d5443650902252305h6e221b4epd724d8331607eebb@mail.gmail.com \
    --to=soni.trilok@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kmpark@infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).