mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
i2c: designware: Let PCI core to take care about interrupt vectors
PCI core, after pcim_enable_device(), takes care about the allocated IRQ vectors, no need to do it explicitly and break the cleaning up order. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
This commit is contained in:
parent
1a2b14e9ce
commit
c2587420fe
@ -295,10 +295,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
|
||||
|
||||
if (controller->setup) {
|
||||
r = controller->setup(pdev, controller);
|
||||
if (r) {
|
||||
pci_free_irq_vectors(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
i2c_dw_adjust_bus_speed(dev);
|
||||
@ -307,10 +305,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
|
||||
i2c_dw_acpi_configure(&pdev->dev);
|
||||
|
||||
r = i2c_dw_validate_speed(dev);
|
||||
if (r) {
|
||||
pci_free_irq_vectors(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
i2c_dw_configure(dev);
|
||||
|
||||
@ -330,10 +326,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
|
||||
adap->nr = controller->bus_num;
|
||||
|
||||
r = i2c_dw_probe(dev);
|
||||
if (r) {
|
||||
pci_free_irq_vectors(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU) {
|
||||
dev->slave = i2c_new_ccgx_ucsi(&dev->adapter, dev->irq, &dgpu_node);
|
||||
@ -359,8 +353,6 @@ static void i2c_dw_pci_remove(struct pci_dev *pdev)
|
||||
pm_runtime_get_noresume(&pdev->dev);
|
||||
|
||||
i2c_del_adapter(&dev->adapter);
|
||||
devm_free_irq(&pdev->dev, dev->irq, dev);
|
||||
pci_free_irq_vectors(pdev);
|
||||
}
|
||||
|
||||
static const struct pci_device_id i2_designware_pci_ids[] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user