File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
drivers/input/touchscreen Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -822,22 +822,16 @@ static int goodix_resource(struct acpi_resource *ares, void *data)
822
822
struct device * dev = & ts -> client -> dev ;
823
823
struct acpi_resource_gpio * gpio ;
824
824
825
- switch (ares -> type ) {
826
- case ACPI_RESOURCE_TYPE_GPIO :
827
- gpio = & ares -> data .gpio ;
828
- if (gpio -> connection_type == ACPI_RESOURCE_GPIO_TYPE_INT ) {
829
- if (ts -> gpio_int_idx == -1 ) {
830
- ts -> gpio_int_idx = ts -> gpio_count ;
831
- } else {
832
- dev_err (dev , "More then one GpioInt resource, ignoring ACPI GPIO resources\n" );
833
- ts -> gpio_int_idx = -2 ;
834
- }
825
+ if (acpi_gpio_get_irq_resource (ares , & gpio )) {
826
+ if (ts -> gpio_int_idx == -1 ) {
827
+ ts -> gpio_int_idx = ts -> gpio_count ;
828
+ } else {
829
+ dev_err (dev , "More then one GpioInt resource, ignoring ACPI GPIO resources\n" );
830
+ ts -> gpio_int_idx = -2 ;
835
831
}
836
832
ts -> gpio_count ++ ;
837
- break ;
838
- default :
839
- break ;
840
- }
833
+ } else if (acpi_gpio_get_io_resource (ares , & gpio ))
834
+ ts -> gpio_count ++ ;
841
835
842
836
return 0 ;
843
837
}
You can’t perform that action at this time.
0 commit comments