diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 13 | ||||
-rw-r--r-- | drivers/input/keyboard/gpio_keys_polled.c | 13 | ||||
-rw-r--r-- | drivers/input/keyboard/tca8418_keypad.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/sentelic.c | 2 |
4 files changed, 26 insertions, 4 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index d327f5a2bb0e..b29ca651a395 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -602,6 +602,7 @@ gpio_keys_get_devtree_pdata(struct device *dev) | |||
602 | 602 | ||
603 | i = 0; | 603 | i = 0; |
604 | for_each_child_of_node(node, pp) { | 604 | for_each_child_of_node(node, pp) { |
605 | int gpio; | ||
605 | enum of_gpio_flags flags; | 606 | enum of_gpio_flags flags; |
606 | 607 | ||
607 | if (!of_find_property(pp, "gpios", NULL)) { | 608 | if (!of_find_property(pp, "gpios", NULL)) { |
@@ -610,9 +611,19 @@ gpio_keys_get_devtree_pdata(struct device *dev) | |||
610 | continue; | 611 | continue; |
611 | } | 612 | } |
612 | 613 | ||
614 | gpio = of_get_gpio_flags(pp, 0, &flags); | ||
615 | if (gpio < 0) { | ||
616 | error = gpio; | ||
617 | if (error != -EPROBE_DEFER) | ||
618 | dev_err(dev, | ||
619 | "Failed to get gpio flags, error: %d\n", | ||
620 | error); | ||
621 | goto err_free_pdata; | ||
622 | } | ||
623 | |||
613 | button = &pdata->buttons[i++]; | 624 | button = &pdata->buttons[i++]; |
614 | 625 | ||
615 | button->gpio = of_get_gpio_flags(pp, 0, &flags); | 626 | button->gpio = gpio; |
616 | button->active_low = flags & OF_GPIO_ACTIVE_LOW; | 627 | button->active_low = flags & OF_GPIO_ACTIVE_LOW; |
617 | 628 | ||
618 | if (of_property_read_u32(pp, "linux,code", &button->code)) { | 629 | if (of_property_read_u32(pp, "linux,code", &button->code)) { |
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index f686fd970553..21147164874d 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c | |||
@@ -135,6 +135,7 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct | |||
135 | 135 | ||
136 | i = 0; | 136 | i = 0; |
137 | for_each_child_of_node(node, pp) { | 137 | for_each_child_of_node(node, pp) { |
138 | int gpio; | ||
138 | enum of_gpio_flags flags; | 139 | enum of_gpio_flags flags; |
139 | 140 | ||
140 | if (!of_find_property(pp, "gpios", NULL)) { | 141 | if (!of_find_property(pp, "gpios", NULL)) { |
@@ -143,9 +144,19 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct | |||
143 | continue; | 144 | continue; |
144 | } | 145 | } |
145 | 146 | ||
147 | gpio = of_get_gpio_flags(pp, 0, &flags); | ||
148 | if (gpio < 0) { | ||
149 | error = gpio; | ||
150 | if (error != -EPROBE_DEFER) | ||
151 | dev_err(dev, | ||
152 | "Failed to get gpio flags, error: %d\n", | ||
153 | error); | ||
154 | goto err_free_pdata; | ||
155 | } | ||
156 | |||
146 | button = &pdata->buttons[i++]; | 157 | button = &pdata->buttons[i++]; |
147 | 158 | ||
148 | button->gpio = of_get_gpio_flags(pp, 0, &flags); | 159 | button->gpio = gpio; |
149 | button->active_low = flags & OF_GPIO_ACTIVE_LOW; | 160 | button->active_low = flags & OF_GPIO_ACTIVE_LOW; |
150 | 161 | ||
151 | if (of_property_read_u32(pp, "linux,code", &button->code)) { | 162 | if (of_property_read_u32(pp, "linux,code", &button->code)) { |
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index 50e9c5e195e1..a34cc6714e5b 100644 --- a/drivers/input/keyboard/tca8418_keypad.c +++ b/drivers/input/keyboard/tca8418_keypad.c | |||
@@ -384,7 +384,7 @@ static const struct i2c_device_id tca8418_id[] = { | |||
384 | MODULE_DEVICE_TABLE(i2c, tca8418_id); | 384 | MODULE_DEVICE_TABLE(i2c, tca8418_id); |
385 | 385 | ||
386 | #ifdef CONFIG_OF | 386 | #ifdef CONFIG_OF |
387 | static const struct of_device_id tca8418_dt_ids[] __devinitconst = { | 387 | static const struct of_device_id tca8418_dt_ids[] = { |
388 | { .compatible = "ti,tca8418", }, | 388 | { .compatible = "ti,tca8418", }, |
389 | { } | 389 | { } |
390 | }; | 390 | }; |
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c index e582922bacf7..cc7e0d4a8f93 100644 --- a/drivers/input/mouse/sentelic.c +++ b/drivers/input/mouse/sentelic.c | |||
@@ -791,7 +791,7 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse) | |||
791 | fsp_set_slot(dev, 0, fgrs > 0, abs_x, abs_y); | 791 | fsp_set_slot(dev, 0, fgrs > 0, abs_x, abs_y); |
792 | fsp_set_slot(dev, 1, false, 0, 0); | 792 | fsp_set_slot(dev, 1, false, 0, 0); |
793 | } | 793 | } |
794 | if (fgrs > 0) { | 794 | if (fgrs == 1 || (fgrs == 2 && !(packet[0] & FSP_PB0_MFMC_FGR2))) { |
795 | input_report_abs(dev, ABS_X, abs_x); | 795 | input_report_abs(dev, ABS_X, abs_x); |
796 | input_report_abs(dev, ABS_Y, abs_y); | 796 | input_report_abs(dev, ABS_Y, abs_y); |
797 | } | 797 | } |