From: Linus Torvalds Date: Tue, 12 Nov 2013 07:27:42 +0000 (+0900) Subject: Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=85b656cf1560e27a89354a23f2c10ba229d2f173;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'for-next' of git://git./linux/kernel/git/cooloney/linux-leds Pull LED subsystem changes from Bryan Wu: "LED subsystem updates for 3.13 are basically cleanup and also add a new driver for PCA9685" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: leds: lp55xx: handle enable pin in driver leds-gpio: of: led should not be created if its status is disabled of: introduce of_get_available_child_count leds: Added driver for the NXP PCA9685 I2C chip leds: pwm: Remove redundant of_match_ptr leds: Include linux/of.h header leds: dac124s085: Remove redundant spi_set_drvdata leds: lp55xx: enable setting default trigger leds: blinkm: Remove redundant break --- 85b656cf1560e27a89354a23f2c10ba229d2f173 diff --cc include/linux/of.h index c08c07e249b3,54c25606a997..ebf75f760bd3 --- a/include/linux/of.h +++ b/include/linux/of.h @@@ -226,8 -226,17 +226,19 @@@ static inline int of_get_child_count(co return num; } + static inline int of_get_available_child_count(const struct device_node *np) + { + struct device_node *child; + int num = 0; + + for_each_available_child_of_node(np, child) + num++; + + return num; + } + +/* cache lookup */ +extern struct device_node *of_find_next_cache_node(const struct device_node *); extern struct device_node *of_find_node_with_property( struct device_node *from, const char *prop_name); #define for_each_node_with_property(dn, prop_name) \