Skip to contentSkip to conversation

video sysfs support: Add dev argument for backlight_device_register.

PATCH In review Yu Luming 2 participants 2 messages Nov 2, 2006

Subsystems (3)
lore
Share & tools
lore

Yu Luming

author
#0 lore raw

PATCH 1/6 video sysfs support: Add dev argument for backlight_device_register.

Video sysfs support: add dev argument for backlight_device_register.

signed-off-by [email protected]
---

[patch 1/6] video sysfs support: add dev argument for backlight_device_register.

 drivers/video/backlight/backlight.c |    7 +++++--
 include/linux/backlight.h           |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)
drivers/video/backlight/backlight.c +5 -2
index 27597c5..1d97cdf 100644
@@ -190,8 +190,10 @@ static int fb_notifier_callback(struct n
  * Creates and registers new backlight class_device. Returns either an
  * ERR_PTR() or a pointer to the newly allocated device.
  */
-struct backlight_device *backlight_device_register(const char *name, void *devdata,
-						   struct backlight_properties *bp)
+struct backlight_device *backlight_device_register(const char *name,
+	struct device *dev,
+	void *devdata,
+	struct backlight_properties *bp)
 {
 	int i, rc;
 	struct backlight_device *new_bd;
@@ -206,6 +208,7 @@ struct backlight_device *backlight_devic
 	new_bd->props = bp;
 	memset(&new_bd->class_dev, 0, sizeof(new_bd->class_dev));
 	new_bd->class_dev.class = &backlight_class;
+	new_bd->class_dev.dev = dev;
 	strlcpy(new_bd->class_dev.class_id, name, KOBJ_NAME_LEN);
 	class_set_devdata(&new_bd->class_dev, devdata);
 
include/linux/backlight.h +1 -1
index 75e91f5..a5cf1be 100644
@@ -54,7 +54,7 @@ struct backlight_device {
 };
 
 extern struct backlight_device *backlight_device_register(const char *name,
-	void *devdata, struct backlight_properties *bp);
+	struct device *dev,void *devdata,struct backlight_properties *bp);
 extern void backlight_device_unregister(struct backlight_device *bd);
 
 #define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev)
#1 lore raw

The second patch throws a decent-sized reject against Len's current tree. I was going to fix that but I note that the patches have serious whitespace
issues: multiple-spaces are used in many places where hard tabs should be used. Please fix all of that up.

Also, there's no overall description of what these patches *do*. Just a bunch of one-liners. But what is the overall end-result?