public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot()
       [not found] <1511328675-21981-1-git-send-email-okaya@codeaurora.org>
@ 2017-11-22  5:31 ` Sinan Kaya
  2017-11-22 12:20   ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Sinan Kaya @ 2017-11-22  5:31 UTC (permalink / raw)
  To: linux-pci, timur
  Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Alan Cox, Hans Verkuil,
	kbuild test robot, Arushi Singhal, Arnd Bergmann, Avraham Shukron,
	Philippe Ombredanne, Kate Stewart, 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.

Use pci_get_domain_bus_and_slot() with a domain number of 0 where we can't
extract the domain number. Other places, use the actual domain number from
the device.

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] 4+ messages in thread

* Re: [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot()
  2017-11-22  5:31 ` [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot() Sinan Kaya
@ 2017-11-22 12:20   ` Alan Cox
  2017-11-22 14:05     ` Sinan Kaya
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2017-11-22 12:20 UTC (permalink / raw)
  To: Sinan Kaya, linux-pci, timur
  Cc: linux-arm-msm, linux-arm-kernel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Hans Verkuil, kbuild test robot,
	Arushi Singhal, Arnd Bergmann, Avraham Shukron,
	Philippe Ombredanne, Kate Stewart, Valentin Vidic,
	open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
	open list:STAGING SUBSYSTEM, open list

On Wed, 2017-11-22 at 00:31 -0500, Sinan Kaya wrote:
> 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.

The ISP v2 will always been in domain 0.

Alan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot()
  2017-11-22 12:20   ` Alan Cox
@ 2017-11-22 14:05     ` Sinan Kaya
  2017-11-22 14:06       ` Sinan Kaya
  0 siblings, 1 reply; 4+ messages in thread
From: Sinan Kaya @ 2017-11-22 14:05 UTC (permalink / raw)
  To: Alan Cox, linux-pci, timur
  Cc: linux-arm-msm, linux-arm-kernel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Hans Verkuil, kbuild test robot,
	Arushi Singhal, Arnd Bergmann, Avraham Shukron,
	Philippe Ombredanne, Kate Stewart, Valentin Vidic,
	open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
	open list:STAGING SUBSYSTEM, open list

Hi Alex,

On 11/22/2017 7:20 AM, Alan Cox wrote:
> On Wed, 2017-11-22 at 00:31 -0500, Sinan Kaya wrote:
>> 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.
> 
> The ISP v2 will always been in domain 0.
> 

Sorry, I didn't get what you mean. Do you mean that you are OK with the
change (thus, can I get a reviewed by) or do you mean that I should fix
the commit message?

I wrote a generic commit message and applied it to all 30 patches that
are more or less similar. I can certainly tailor the message a little
bit for atomisp since you confirmed domain 0.

> Alan
> 
> 


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot()
  2017-11-22 14:05     ` Sinan Kaya
@ 2017-11-22 14:06       ` Sinan Kaya
  0 siblings, 0 replies; 4+ messages in thread
From: Sinan Kaya @ 2017-11-22 14:06 UTC (permalink / raw)
  To: Alan Cox, linux-pci, timur
  Cc: linux-arm-msm, linux-arm-kernel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Hans Verkuil, kbuild test robot,
	Arushi Singhal, Arnd Bergmann, Avraham Shukron,
	Philippe Ombredanne, Kate Stewart, Valentin Vidic,
	open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
	open list:STAGING SUBSYSTEM, open list

On 11/22/2017 9:05 AM, Sinan Kaya wrote:
> Hi Alex,

I tried to mean Alan. Sorry about that. 

Apparently, I didn't have enough coffee this morning. I shouldn't touch the
code for a few hours.

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-22 14:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1511328675-21981-1-git-send-email-okaya@codeaurora.org>
2017-11-22  5:31 ` [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot() Sinan Kaya
2017-11-22 12:20   ` Alan Cox
2017-11-22 14:05     ` Sinan Kaya
2017-11-22 14:06       ` Sinan Kaya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox