From: Jiri Slaby <jirislaby@gmail.com>
To: Adam Nielsen <a.nielsen@shikadi.net>
Cc: LKML Mailinglist <linux-kernel@vger.kernel.org>
Subject: Re: led and hid class - hid_device vs led_classdev
Date: Tue, 04 Nov 2008 22:48:31 +0100 [thread overview]
Message-ID: <4910C32F.9060204@gmail.com> (raw)
In-Reply-To: <490FFF1B.6050300@shikadi.net>
On 11/04/2008 08:51 AM, Adam Nielsen wrote:
> /* Callback function when user wants to change LED state */
> static void my_led_set(struct led_classdev *led_cdev,
> enum led_brightness value)
> {
> /* How do I get my_data back? */
> }
>
> Hopefully this explains what I'm after - if you need me to clarify
> anything please let me know.
my_led should by part of my_data, then you do
my_data = container_of(led_cdev, /*typeof(my_data)*/, my_led);
next prev parent reply other threads:[~2008-11-04 21:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-04 7:51 led and hid class - hid_device vs led_classdev Adam Nielsen
2008-11-04 21:48 ` Jiri Slaby [this message]
2008-11-08 6:18 ` hid class and sysfs/hwmon (was: led and hid class - hid_device vs led_classdev) Adam Nielsen
2008-11-08 14:16 ` hid class and sysfs/hwmon Jiri Slaby
2008-11-08 21:45 ` Adam Nielsen
2008-11-08 21:51 ` Jiri Slaby
2008-11-08 22:02 ` Adam Nielsen
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=4910C32F.9060204@gmail.com \
--to=jirislaby@gmail.com \
--cc=a.nielsen@shikadi.net \
--cc=linux-kernel@vger.kernel.org \
/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