* [PATCH V3 22/29] [media] atomisp: deprecate pci_get_bus_and_slot()
[not found] <1511801886-6753-1-git-send-email-okaya@codeaurora.org>
@ 2017-11-27 16:57 ` Sinan Kaya
2017-11-29 8:36 ` Sakari Ailus
0 siblings, 1 reply; 2+ messages in thread
From: Sinan Kaya @ 2017-11-27 16:57 UTC (permalink / raw)
To: linux-pci, timur
Cc: linux-arm-msm, linux-arm-kernel, intel-gfx, Sinan Kaya,
Mauro Carvalho Chehab, Greg Kroah-Hartman, Alan Cox,
Hans Verkuil, kbuild test robot, Dan Carpenter, Arnd Bergmann,
Arushi Singhal, Avraham Shukron, Philippe Ombredanne,
Valentin Vidic, open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
open list:STAGING SUBSYSTEM, open list
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
where a PCI device is present. This restricts the device drivers to be
reused for other domain numbers.
Getting ready to remove pci_get_bus_and_slot() function. Since ISP always
uses domain 0, hard-code it in the code when calling the replacement
function pci_get_domain_bus_and_slot().
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 2 +-
drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c
index 663aa91..95b9c7a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c
@@ -1233,7 +1233,7 @@ static int atomisp_pci_probe(struct pci_dev *dev,
isp->pdev = dev;
isp->dev = &dev->dev;
isp->sw_contex.power_state = ATOM_ISP_POWER_UP;
- isp->pci_root = pci_get_bus_and_slot(0, 0);
+ isp->pci_root = pci_get_domain_bus_and_slot(0, 0, 0);
if (!isp->pci_root) {
dev_err(&dev->dev, "Unable to find PCI host\n");
return -ENODEV;
diff --git a/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c b/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c
index 4631b1d..51dcef57 100644
--- a/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c
+++ b/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c
@@ -39,7 +39,7 @@ static inline int platform_is(u8 model)
static int intel_mid_msgbus_init(void)
{
- pci_root = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
+ pci_root = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
if (!pci_root) {
pr_err("%s: Error: msgbus PCI handle NULL\n", __func__);
return -ENODEV;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V3 22/29] [media] atomisp: deprecate pci_get_bus_and_slot()
2017-11-27 16:57 ` [PATCH V3 22/29] [media] atomisp: deprecate pci_get_bus_and_slot() Sinan Kaya
@ 2017-11-29 8:36 ` Sakari Ailus
0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2017-11-29 8:36 UTC (permalink / raw)
To: Sinan Kaya
Cc: linux-pci, timur, linux-arm-msm, linux-arm-kernel, intel-gfx,
Mauro Carvalho Chehab, Greg Kroah-Hartman, Alan Cox,
Hans Verkuil, kbuild test robot, Dan Carpenter, Arnd Bergmann,
Arushi Singhal, Avraham Shukron, Philippe Ombredanne,
Valentin Vidic, open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
open list:STAGING SUBSYSTEM, open list
Hi Sinan,
On Mon, Nov 27, 2017 at 11:57:59AM -0500, Sinan Kaya wrote:
> diff --git a/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c b/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c
> index 4631b1d..51dcef57 100644
> --- a/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c
> +++ b/drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c
> @@ -39,7 +39,7 @@ static inline int platform_is(u8 model)
>
> static int intel_mid_msgbus_init(void)
> {
> - pci_root = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
> + pci_root = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
> if (!pci_root) {
> pr_err("%s: Error: msgbus PCI handle NULL\n", __func__);
> return -ENODEV;
This file has been removed, I'm applying the rest of the patch.
Please use the media tree as the base in the future. Thanks.
--
Sakari Ailus
e-mail: sakari.ailus@iki.fi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-29 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1511801886-6753-1-git-send-email-okaya@codeaurora.org>
2017-11-27 16:57 ` [PATCH V3 22/29] [media] atomisp: deprecate pci_get_bus_and_slot() Sinan Kaya
2017-11-29 8:36 ` Sakari Ailus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).