From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sinan Kaya Subject: [PATCH 25/30] backlight: deprecate pci_get_bus_and_slot() Date: Wed, 22 Nov 2017 00:31:10 -0500 Message-ID: <1511328675-21981-26-git-send-email-okaya@codeaurora.org> References: <1511328675-21981-1-git-send-email-okaya@codeaurora.org> Return-path: In-Reply-To: <1511328675-21981-1-git-send-email-okaya@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org To: linux-pci@vger.kernel.org, timur@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , "open list:FRAMEBUFFER LAYER" , open list List-Id: linux-arm-msm@vger.kernel.org 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 --- drivers/video/backlight/apple_bl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/apple_bl.c b/drivers/video/backlight/apple_bl.c index d843296..6a34ab9 100644 --- a/drivers/video/backlight/apple_bl.c +++ b/drivers/video/backlight/apple_bl.c @@ -143,7 +143,7 @@ static int apple_bl_add(struct acpi_device *dev) struct pci_dev *host; int intensity; - host = pci_get_bus_and_slot(0, 0); + host = pci_get_domain_bus_and_slot(0, 0, 0); if (!host) { pr_err("unable to find PCI host\n"); -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751938AbdKVFcl (ORCPT ); Wed, 22 Nov 2017 00:32:41 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:41654 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751884AbdKVFch (ORCPT ); Wed, 22 Nov 2017 00:32:37 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 68C6460B69 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-pci@vger.kernel.org, timur@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org (open list:FRAMEBUFFER LAYER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 25/30] backlight: deprecate pci_get_bus_and_slot() Date: Wed, 22 Nov 2017 00:31:10 -0500 Message-Id: <1511328675-21981-26-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1511328675-21981-1-git-send-email-okaya@codeaurora.org> References: <1511328675-21981-1-git-send-email-okaya@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/video/backlight/apple_bl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/apple_bl.c b/drivers/video/backlight/apple_bl.c index d843296..6a34ab9 100644 --- a/drivers/video/backlight/apple_bl.c +++ b/drivers/video/backlight/apple_bl.c @@ -143,7 +143,7 @@ static int apple_bl_add(struct acpi_device *dev) struct pci_dev *host; int intensity; - host = pci_get_bus_and_slot(0, 0); + host = pci_get_domain_bus_and_slot(0, 0, 0); if (!host) { pr_err("unable to find PCI host\n"); -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sinan Kaya Date: Wed, 22 Nov 2017 05:31:10 +0000 Subject: [PATCH 25/30] backlight: deprecate pci_get_bus_and_slot() Message-Id: <1511328675-21981-26-git-send-email-okaya@codeaurora.org> List-Id: References: <1511328675-21981-1-git-send-email-okaya@codeaurora.org> In-Reply-To: <1511328675-21981-1-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org 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 --- drivers/video/backlight/apple_bl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/apple_bl.c b/drivers/video/backlight/apple_bl.c index d843296..6a34ab9 100644 --- a/drivers/video/backlight/apple_bl.c +++ b/drivers/video/backlight/apple_bl.c @@ -143,7 +143,7 @@ static int apple_bl_add(struct acpi_device *dev) struct pci_dev *host; int intensity; - host = pci_get_bus_and_slot(0, 0); + host = pci_get_domain_bus_and_slot(0, 0, 0); if (!host) { pr_err("unable to find PCI host\n"); -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: okaya@codeaurora.org (Sinan Kaya) Date: Wed, 22 Nov 2017 00:31:10 -0500 Subject: [PATCH 25/30] backlight: deprecate pci_get_bus_and_slot() In-Reply-To: <1511328675-21981-1-git-send-email-okaya@codeaurora.org> References: <1511328675-21981-1-git-send-email-okaya@codeaurora.org> Message-ID: <1511328675-21981-26-git-send-email-okaya@codeaurora.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 --- drivers/video/backlight/apple_bl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/apple_bl.c b/drivers/video/backlight/apple_bl.c index d843296..6a34ab9 100644 --- a/drivers/video/backlight/apple_bl.c +++ b/drivers/video/backlight/apple_bl.c @@ -143,7 +143,7 @@ static int apple_bl_add(struct acpi_device *dev) struct pci_dev *host; int intensity; - host = pci_get_bus_and_slot(0, 0); + host = pci_get_domain_bus_and_slot(0, 0, 0); if (!host) { pr_err("unable to find PCI host\n"); -- 1.9.1