diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-08-17 18:07:30 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-09-10 14:19:02 +0200 |
commit | 34a07e65bae27abb620a78b6728777678365a6fb (patch) | |
tree | 3e3aa39346ca985640b45668a31bf011e0d48929 | |
parent | 44677b03caa3363da6f2810a83da367e55f026d9 (diff) | |
download | linux-34a07e65bae27abb620a78b6728777678365a6fb.tar.bz2 |
media: ipu3-cio2: Get rid of pci_set_master() duplication
It's unclear why driver repeats the code from PCI core.
Drop it for good.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r-- | drivers/media/pci/intel/ipu3/ipu3-cio2.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c index e47896bb69ad..ad88e8db7f61 100644 --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c @@ -1708,24 +1708,6 @@ static void cio2_queues_exit(struct cio2_device *cio2) /**************** PCI interface ****************/ -static int cio2_pci_config_setup(struct pci_dev *dev) -{ - u16 pci_command; - int r = pci_enable_msi(dev); - - if (r) { - dev_err(&dev->dev, "failed to enable MSI (%d)\n", r); - return r; - } - - pci_read_config_word(dev, PCI_COMMAND, &pci_command); - pci_command |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | - PCI_COMMAND_INTX_DISABLE; - pci_write_config_word(dev, PCI_COMMAND, pci_command); - - return 0; -} - static int cio2_pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) { @@ -1771,9 +1753,11 @@ static int cio2_pci_probe(struct pci_dev *pci_dev, return -ENODEV; } - r = cio2_pci_config_setup(pci_dev); - if (r) - return -ENODEV; + r = pci_enable_msi(pci_dev); + if (r) { + dev_err(&pci_dev->dev, "failed to enable MSI (%d)\n", r); + return r; + } r = cio2_fbpt_init_dummy(cio2); if (r) |