--- zzzz-none-000/linux-3.10.107/drivers/gpio/gpio-spear-spics.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/gpio/gpio-spear-spics.c 2021-02-04 17:41:59.000000000 +0000 @@ -2,7 +2,7 @@ * SPEAr platform SPI chipselect abstraction over gpiolib * * Copyright (C) 2012 ST Microelectronics - * Shiraz Hashim + * Shiraz Hashim * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any @@ -128,18 +128,11 @@ struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "invalid IORESOURCE_MEM\n"); - return -EBUSY; - } - spics = devm_kzalloc(&pdev->dev, sizeof(*spics), GFP_KERNEL); - if (!spics) { - dev_err(&pdev->dev, "memory allocation fail\n"); + if (!spics) return -ENOMEM; - } + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); spics->base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(spics->base)) return PTR_ERR(spics->base); @@ -198,7 +191,6 @@ static struct platform_driver spics_gpio_driver = { .probe = spics_gpio_probe, .driver = { - .owner = THIS_MODULE, .name = "spear-spics-gpio", .of_match_table = spics_gpio_of_match, }, @@ -210,6 +202,6 @@ } subsys_initcall(spics_gpio_init); -MODULE_AUTHOR("Shiraz Hashim "); -MODULE_DESCRIPTION("ST Microlectronics SPEAr SPI Chip Select Abstraction"); +MODULE_AUTHOR("Shiraz Hashim "); +MODULE_DESCRIPTION("STMicroelectronics SPEAr SPI Chip Select Abstraction"); MODULE_LICENSE("GPL");