aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2006-04-11 01:54:02 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 09:18:41 -0400
commitfb5035dbbea8826cdbeb5c43d7605255eb6f0baa (patch)
treebf01a0b9321cd6715051f477750c108afa699963
parent24f51e81745861c70da2255ce30c7078aed2d20e (diff)
[PATCH] leds: re-layout include/linux/leds.h
Lay out the structure definitions in include/linux/leds.h to be aligned as much as possible. Also minor updates to the comments to make them more concise. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Acked-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/leds.h51
1 files changed, 25 insertions, 26 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 4617e75903b0..dc23c7c639f3 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -19,39 +19,38 @@ struct class_device;
19 */ 19 */
20 20
21enum led_brightness { 21enum led_brightness {
22 LED_OFF = 0, 22 LED_OFF = 0,
23 LED_HALF = 127, 23 LED_HALF = 127,
24 LED_FULL = 255, 24 LED_FULL = 255,
25}; 25};
26 26
27struct led_classdev { 27struct led_classdev {
28 const char *name; 28 const char *name;
29 int brightness; 29 int brightness;
30 int flags; 30 int flags;
31#define LED_SUSPENDED (1 << 0)
32 31
33 /* A function to set the brightness of the led */ 32#define LED_SUSPENDED (1 << 0)
34 void (*brightness_set)(struct led_classdev *led_cdev,
35 enum led_brightness brightness);
36 33
37 struct class_device *class_dev; 34 /* Set LED brightness level */
38 /* LED Device linked list */ 35 void (*brightness_set)(struct led_classdev *led_cdev,
39 struct list_head node; 36 enum led_brightness brightness);
37
38 struct class_device *class_dev;
39 struct list_head node; /* LED Device list */
40 char *default_trigger; /* Trigger to use */
40 41
41 /* Trigger data */
42 char *default_trigger;
43#ifdef CONFIG_LEDS_TRIGGERS 42#ifdef CONFIG_LEDS_TRIGGERS
44 rwlock_t trigger_lock;
45 /* Protects the trigger data below */ 43 /* Protects the trigger data below */
44 rwlock_t trigger_lock;
46 45
47 struct led_trigger *trigger; 46 struct led_trigger *trigger;
48 struct list_head trig_list; 47 struct list_head trig_list;
49 void *trigger_data; 48 void *trigger_data;
50#endif 49#endif
51}; 50};
52 51
53extern int led_classdev_register(struct device *parent, 52extern int led_classdev_register(struct device *parent,
54 struct led_classdev *led_cdev); 53 struct led_classdev *led_cdev);
55extern void led_classdev_unregister(struct led_classdev *led_cdev); 54extern void led_classdev_unregister(struct led_classdev *led_cdev);
56extern void led_classdev_suspend(struct led_classdev *led_cdev); 55extern void led_classdev_suspend(struct led_classdev *led_cdev);
57extern void led_classdev_resume(struct led_classdev *led_cdev); 56extern void led_classdev_resume(struct led_classdev *led_cdev);
@@ -65,16 +64,16 @@ extern void led_classdev_resume(struct led_classdev *led_cdev);
65 64
66struct led_trigger { 65struct led_trigger {
67 /* Trigger Properties */ 66 /* Trigger Properties */
68 const char *name; 67 const char *name;
69 void (*activate)(struct led_classdev *led_cdev); 68 void (*activate)(struct led_classdev *led_cdev);
70 void (*deactivate)(struct led_classdev *led_cdev); 69 void (*deactivate)(struct led_classdev *led_cdev);
71 70
72 /* LEDs under control by this trigger (for simple triggers) */ 71 /* LEDs under control by this trigger (for simple triggers) */
73 rwlock_t leddev_list_lock; 72 rwlock_t leddev_list_lock;
74 struct list_head led_cdevs; 73 struct list_head led_cdevs;
75 74
76 /* Link to next registered trigger */ 75 /* Link to next registered trigger */
77 struct list_head next_trig; 76 struct list_head next_trig;
78}; 77};
79 78
80/* Registration functions for complex triggers */ 79/* Registration functions for complex triggers */