--- zzzz-none-000/linux-3.10.107/drivers/gpio/gpio-da9055.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/gpio/gpio-da9055.c 2021-02-04 17:41:59.000000000 +0000 @@ -134,7 +134,7 @@ .direction_input = da9055_gpio_direction_input, .direction_output = da9055_gpio_direction_output, .to_irq = da9055_gpio_to_irq, - .can_sleep = 1, + .can_sleep = true, .ngpio = 3, .base = -1, }; @@ -146,11 +146,11 @@ int ret; gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); - if (gpio == NULL) + if (!gpio) return -ENOMEM; gpio->da9055 = dev_get_drvdata(pdev->dev.parent); - pdata = gpio->da9055->dev->platform_data; + pdata = dev_get_platdata(gpio->da9055->dev); gpio->gp = reference_gp; if (pdata && pdata->gpio_base) @@ -174,7 +174,8 @@ { struct da9055_gpio *gpio = platform_get_drvdata(pdev); - return gpiochip_remove(&gpio->gp); + gpiochip_remove(&gpio->gp); + return 0; } static struct platform_driver da9055_gpio_driver = { @@ -182,7 +183,6 @@ .remove = da9055_gpio_remove, .driver = { .name = "da9055-gpio", - .owner = THIS_MODULE, }, };