--- zzzz-none-000/linux-3.10.107/drivers/gpio/gpio-ml-ioh.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/gpio/gpio-ml-ioh.c 2021-02-04 17:41:59.000000000 +0000 @@ -242,7 +242,7 @@ gpio->dbg_show = NULL; gpio->base = -1; gpio->ngpio = num_port; - gpio->can_sleep = 0; + gpio->can_sleep = false; gpio->to_irq = ioh_gpio_to_irq; } @@ -465,6 +465,7 @@ dev_warn(&pdev->dev, "ml_ioh_gpio: Failed to get IRQ base num\n"); chip->irq_base = -1; + ret = irq_base; goto err_irq_alloc_descs; } chip->irq_base = irq_base; @@ -496,8 +497,7 @@ err_gpiochip_add: while (--i >= 0) { chip--; - if (gpiochip_remove(&chip->gpio)) - dev_err(&pdev->dev, "Failed gpiochip_remove(%d)\n", i); + gpiochip_remove(&chip->gpio); } kfree(chip_save); @@ -518,7 +518,6 @@ static void ioh_gpio_remove(struct pci_dev *pdev) { - int err; int i; struct ioh_gpio *chip = pci_get_drvdata(pdev); void *chip_save; @@ -529,9 +528,7 @@ for (i = 0; i < 8; i++, chip++) { irq_free_descs(chip->irq_base, num_ports[i]); - err = gpiochip_remove(&chip->gpio); - if (err) - dev_err(&pdev->dev, "Failed gpiochip_remove\n"); + gpiochip_remove(&chip->gpio); } chip = chip_save; @@ -595,7 +592,7 @@ #define ioh_gpio_resume NULL #endif -static DEFINE_PCI_DEVICE_TABLE(ioh_gpio_pcidev_id) = { +static const struct pci_device_id ioh_gpio_pcidev_id[] = { { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x802E) }, { 0, } };