Skip to content

Commit

Permalink
media: atomisp: use pcim_enable_device() again
Browse files Browse the repository at this point in the history
Changing to pci_enable_device() didn't produce the expected
result. It could also eventually led to problems when driver
is removed, due to object lifetime issues. So, let's just
return to the previous behavior.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
Mauro Carvalho Chehab committed May 20, 2020
1 parent 4877b19 commit a27b581
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/staging/media/atomisp/pci/atomisp_v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ static int atomisp_pci_probe(struct pci_dev *dev,
if (!pdata)
dev_warn(&dev->dev, "no platform data available\n");

err = pci_enable_device(dev);
err = pcim_enable_device(dev);
if (err) {
dev_err(&dev->dev, "Failed to enable CI ISP device (%d)\n",
err);
Expand Down Expand Up @@ -1907,7 +1907,6 @@ static int atomisp_pci_probe(struct pci_dev *dev,
atomisp_msi_irq_uninit(isp, dev);
pci_disable_msi(dev);
enable_msi_fail:
pci_disable_device(dev);
fw_validation_fail:
release_firmware(isp->firmware);
load_fw_fail:
Expand Down Expand Up @@ -1968,8 +1967,6 @@ static void atomisp_pci_remove(struct pci_dev *dev)
release_firmware(isp->firmware);

hmm_pool_unregister(HMM_POOL_TYPE_RESERVED);

pci_disable_device(dev);
}

static const struct pci_device_id atomisp_pci_tbl[] = {
Expand Down

0 comments on commit a27b581

Please sign in to comment.