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
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user