From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751690AbdKVHyU (ORCPT ); Wed, 22 Nov 2017 02:54:20 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:42384 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbdKVHyS (ORCPT ); Wed, 22 Nov 2017 02:54:18 -0500 Date: Wed, 22 Nov 2017 08:54:22 +0100 From: Greg Kroah-Hartman To: Sinan Kaya Cc: linux-pci@vger.kernel.org, timur@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Colin Ian King , Johannes Thumshirn , Hannes Reinecke , Gaurav Pathak , "open list:STAGING SUBSYSTEM" , open list Subject: Re: [PATCH 24/30] staging: rts5208: deprecate pci_get_bus_and_slot() Message-ID: <20171122075422.GD26583@kroah.com> References: <1511328675-21981-1-git-send-email-okaya@codeaurora.org> <1511328675-21981-25-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1511328675-21981-25-git-send-email-okaya@codeaurora.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 22, 2017 at 12:31:09AM -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. > > 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/staging/rts5208/rtsx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c > index 89e2cfe..13b14fe 100644 > --- a/drivers/staging/rts5208/rtsx.c > +++ b/drivers/staging/rts5208/rtsx.c > @@ -281,7 +281,7 @@ int rtsx_read_pci_cfg_byte(u8 bus, u8 dev, u8 func, u8 offset, u8 *val) > u8 data; > u8 devfn = (dev << 3) | func; > > - pdev = pci_get_bus_and_slot(bus, devfn); > + pdev = pci_get_domain_bus_and_slot(0, bus, devfn); Ugh, this whole function should go away, but it's good enough for now, I'll queue it up after -rc1 is out. thanks, greg k-h