[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4910C32F.9060204@gmail.com>
Date: Tue, 04 Nov 2008 22:48:31 +0100
From: Jiri Slaby <jirislaby@...il.com>
To: Adam Nielsen <a.nielsen@...kadi.net>
CC: LKML Mailinglist <linux-kernel@...r.kernel.org>
Subject: Re: led and hid class - hid_device vs led_classdev
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);
--
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