Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348246
b: refs/heads/master
c: d46329a
h: refs/heads/master
v: v3
  • Loading branch information
Gabor Juhos authored and Dmitry Torokhov committed Dec 24, 2012
1 parent c3235aa commit e68c451
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a25461659050b913e114d282bf58823682eb56b6
refs/heads/master: d46329a708c1a3301e272a029266b69339c0877f
13 changes: 12 additions & 1 deletion trunk/drivers/input/keyboard/gpio_keys_polled.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct

i = 0;
for_each_child_of_node(node, pp) {
int gpio;
enum of_gpio_flags flags;

if (!of_find_property(pp, "gpios", NULL)) {
Expand All @@ -143,9 +144,19 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct
continue;
}

gpio = of_get_gpio_flags(pp, 0, &flags);
if (gpio < 0) {
error = gpio;
if (error != -EPROBE_DEFER)
dev_err(dev,
"Failed to get gpio flags, error: %d\n",
error);
goto err_free_pdata;
}

button = &pdata->buttons[i++];

button->gpio = of_get_gpio_flags(pp, 0, &flags);
button->gpio = gpio;
button->active_low = flags & OF_GPIO_ACTIVE_LOW;

if (of_property_read_u32(pp, "linux,code", &button->code)) {
Expand Down

0 comments on commit e68c451

Please sign in to comment.