--- zzzz-none-000/linux-3.10.107/drivers/media/rc/gpio-ir-recv.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/rc/gpio-ir-recv.c 2021-02-04 17:41:59.000000000 +0000 @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -58,7 +59,7 @@ return 0; } -static struct of_device_id gpio_ir_recv_of_match[] = { +static const struct of_device_id gpio_ir_recv_of_match[] = { { .compatible = "gpio-ir-receiver", }, { }, }; @@ -77,7 +78,7 @@ int rc = 0; enum raw_event_type type = IR_SPACE; - gval = gpio_get_value_cansleep(gpio_dev->gpio_nr); + gval = gpio_get_value(gpio_dev->gpio_nr); if (gval < 0) goto err_get_value; @@ -144,9 +145,9 @@ rcdev->dev.parent = &pdev->dev; rcdev->driver_name = GPIO_IR_DRIVER_NAME; if (pdata->allowed_protos) - rcdev->allowed_protos = pdata->allowed_protos; + rcdev->allowed_protocols = pdata->allowed_protos; else - rcdev->allowed_protos = RC_BIT_ALL; + rcdev->allowed_protocols = RC_BIT_ALL; rcdev->map_name = pdata->map_name ?: RC_MAP_EMPTY; gpio_dev->rcdev = rcdev; @@ -178,7 +179,6 @@ return 0; err_request_irq: - platform_set_drvdata(pdev, NULL); rc_unregister_device(rcdev); rcdev = NULL; err_register_rc_device: @@ -196,7 +196,6 @@ struct gpio_rc_dev *gpio_dev = platform_get_drvdata(pdev); free_irq(gpio_to_irq(gpio_dev->gpio_nr), gpio_dev); - platform_set_drvdata(pdev, NULL); rc_unregister_device(gpio_dev->rcdev); gpio_free(gpio_dev->gpio_nr); kfree(gpio_dev); @@ -241,7 +240,6 @@ .remove = gpio_ir_recv_remove, .driver = { .name = GPIO_IR_DRIVER_NAME, - .owner = THIS_MODULE, .of_match_table = of_match_ptr(gpio_ir_recv_of_match), #ifdef CONFIG_PM .pm = &gpio_ir_recv_pm_ops,