|
|
@@ -373,7 +373,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
|
|
|
if (!node)
|
|
|
return NULL;
|
|
|
|
|
|
- nbuttons = of_get_child_count(node);
|
|
|
+ nbuttons = of_get_available_child_count(node);
|
|
|
if (nbuttons == 0)
|
|
|
return ERR_PTR(-EINVAL);
|
|
|
|
|
|
@@ -388,7 +388,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
|
|
|
pdata->rep = !!of_get_property(node, "autorepeat", NULL);
|
|
|
of_property_read_u32(node, "poll-interval", &pdata->poll_interval);
|
|
|
|
|
|
- for_each_child_of_node(node, pp) {
|
|
|
+ for_each_available_child_of_node(node, pp) {
|
|
|
button = (struct gpio_keys_button *)(&pdata->buttons[i++]);
|
|
|
|
|
|
if (of_property_read_u32(pp, "linux,code", &button->code)) {
|