Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328521
b: refs/heads/master
c: 31b95bf
h: refs/heads/master
i:
  328519: c4e229a
v: v3
  • Loading branch information
Tobias Klauser authored and Dmitry Torokhov committed Aug 22, 2012
1 parent ec3069e commit c488a5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: f4d4661bee0f54410ac65571b50df5d9fe091d03
refs/heads/master: 31b95bfb79e8d7637ba0d399eb152f9b0d548340
6 changes: 2 additions & 4 deletions trunk/drivers/input/keyboard/samsung-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static struct samsung_keypad_platdata *samsung_keypad_parse_dt(
struct matrix_keymap_data *keymap_data;
uint32_t *keymap, num_rows = 0, num_cols = 0;
struct device_node *np = dev->of_node, *key_np;
unsigned int key_count = 0;
unsigned int key_count;

pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
Expand All @@ -280,9 +280,7 @@ static struct samsung_keypad_platdata *samsung_keypad_parse_dt(
}
pdata->keymap_data = keymap_data;

for_each_child_of_node(np, key_np)
key_count++;

key_count = of_get_child_count(np);
keymap_data->keymap_size = key_count;
keymap = devm_kzalloc(dev, sizeof(uint32_t) * key_count, GFP_KERNEL);
if (!keymap) {
Expand Down

0 comments on commit c488a5c

Please sign in to comment.