]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
backlight-add-of_find_backlight_by_node-function-fix-2
authorThierry Reding <thierry.reding@avionic-design.de>
Thu, 29 Nov 2012 03:18:30 +0000 (14:18 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:32 +0000 (16:23 +1100)
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/backlight/backlight.c

index f41ce15f2fbbcf85b022eba9e4b25c947970fe85..345f6660d4b39bd7f312e8958760e3c54d51ae24 100644 (file)
@@ -376,6 +376,18 @@ static int of_parent_match(struct device *dev, void *data)
        return dev->parent && dev->parent->of_node == data;
 }
 
+/**
+ * of_find_backlight_by_node() - find backlight device by device-tree node
+ * @node: device-tree node of the backlight device
+ *
+ * Returns a pointer to the backlight device corresponding to the given DT
+ * node or NULL if no such backlight device exists or if the device hasn't
+ * been probed yet.
+ *
+ * This function obtains a reference on the backlight device and it is the
+ * caller's responsibility to drop the reference by calling put_device() on
+ * the backlight device's .dev field.
+ */
 struct backlight_device *of_find_backlight_by_node(struct device_node *node)
 {
        struct device *dev;