diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 16:27:42 +0900 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 16:27:42 +0900 |
commit | 85b656cf1560e27a89354a23f2c10ba229d2f173 (patch) | |
tree | 53c8b9d30c45dad618a704fd4a5b6aa5b95250cd /include/linux/of.h | |
parent | 2b684c073f32b557661eba191ce0a584020367e2 (diff) | |
parent | 30dae2f98612d7c8cd855861b9de205ebd9ef4fa (diff) | |
download | linux-stable-85b656cf1560e27a89354a23f2c10ba229d2f173.tar.gz linux-stable-85b656cf1560e27a89354a23f2c10ba229d2f173.tar.bz2 linux-stable-85b656cf1560e27a89354a23f2c10ba229d2f173.zip |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/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
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index c08c07e249b3..ebf75f760bd3 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -226,6 +226,17 @@ static inline int of_get_child_count(const struct device_node *np) 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( @@ -378,6 +389,11 @@ static inline int of_get_child_count(const struct device_node *np) return 0; } +static inline int of_get_available_child_count(const struct device_node *np) +{ + return 0; +} + static inline int of_device_is_compatible(const struct device_node *device, const char *name) { |