mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: linux-kernel@vger.kernel.org
Cc: rpurdie@rpsys.net, akpm@osdl.org
Subject: [PATCH] leds: re-layout include/linux/leds.h
Date: Sun, 2 Apr 2006 12:02:37 +0100	[thread overview]
Message-ID: <20060402110237.GA1756@home.fluff.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

Layout 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>

[-- Attachment #2: 2616-leds-include-layout.patch --]
[-- Type: text/plain, Size: 2575 bytes --]

diff -urpN -X ../dontdiff linux-2.6.16-git20-bjd5/include/linux/leds.h linux-2.6.16-git20-bjd6/include/linux/leds.h
--- linux-2.6.16-git20-bjd5/include/linux/leds.h	2006-04-01 12:38:59.000000000 +0100
+++ linux-2.6.16-git20-bjd6/include/linux/leds.h	2006-04-02 11:57:43.000000000 +0100
@@ -19,39 +19,38 @@ struct class_device;
  */
 
 enum led_brightness {
-	LED_OFF = 0,
-	LED_HALF = 127,
-	LED_FULL = 255,
+	LED_OFF		= 0,
+	LED_HALF	= 127,
+	LED_FULL	= 255,
 };
 
 struct led_classdev {
-	const char *name;
-	int brightness;
-	int flags;
-#define LED_SUSPENDED       (1 << 0)
-
-	/* A function to set the brightness of the led */
-	void (*brightness_set)(struct led_classdev *led_cdev,
-				enum led_brightness brightness);
-
-	struct class_device *class_dev;
-	/* LED Device linked list */
-	struct list_head node;
+	const char		*name;
+	int			 brightness;
+	int			 flags;
+
+#define LED_SUSPENDED		(1 << 0)
+
+	/* Set LED brightness level */
+	void		(*brightness_set)(struct led_classdev *led_cdev,
+					  enum led_brightness brightness);
+
+	struct class_device	*class_dev;
+	struct list_head	 node;			/* LED Device list */
+	char			*default_trigger;	/* Trigger to use */
 
-	/* Trigger data */
-	char *default_trigger;
 #ifdef CONFIG_LEDS_TRIGGERS
-	rwlock_t trigger_lock;
 	/* Protects the trigger data below */
+	rwlock_t		 trigger_lock;
 
-	struct led_trigger *trigger;
-	struct list_head trig_list;
-	void *trigger_data;
+	struct led_trigger	*trigger;
+	struct list_head	 trig_list;
+	void			*trigger_data;
 #endif
 };
 
 extern int led_classdev_register(struct device *parent,
-				struct led_classdev *led_cdev);
+				 struct led_classdev *led_cdev);
 extern void led_classdev_unregister(struct led_classdev *led_cdev);
 extern void led_classdev_suspend(struct led_classdev *led_cdev);
 extern void led_classdev_resume(struct led_classdev *led_cdev);
@@ -65,16 +64,16 @@ extern void led_classdev_resume(struct l
 
 struct led_trigger {
 	/* Trigger Properties */
-	const char *name;
-	void (*activate)(struct led_classdev *led_cdev);
-	void (*deactivate)(struct led_classdev *led_cdev);
+	const char	 *name;
+	void		(*activate)(struct led_classdev *led_cdev);
+	void		(*deactivate)(struct led_classdev *led_cdev);
 
 	/* LEDs under control by this trigger (for simple triggers) */
-	rwlock_t leddev_list_lock;
-	struct list_head led_cdevs;
+	rwlock_t	  leddev_list_lock;
+	struct list_head  led_cdevs;
 
 	/* Link to next registered trigger */
-	struct list_head next_trig;
+	struct list_head  next_trig;
 };
 
 /* Registration functions for complex triggers */

             reply	other threads:[~2006-04-02 11:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02 11:02 Ben Dooks [this message]
2006-04-02 11:54 ` Richard Purdie

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=20060402110237.GA1756@home.fluff.org \
    --to=ben-linux@fluff.org \
    --cc=akpm@osdl.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

Powered by JetHome