From patchwork Wed Nov 22 05:31:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10069799 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BFF5560353 for ; Wed, 22 Nov 2017 05:49:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B96AB204FB for ; Wed, 22 Nov 2017 05:49:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD21329B48; Wed, 22 Nov 2017 05:49:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3FA74204FB for ; Wed, 22 Nov 2017 05:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ymw2+XtNn7nzNlxiuzXfwbPLCZANLTUiyJP7bnLhj/g=; b=EJy95PVhcRtdnHuUqgfokAIpFn 5BOrTn6RYcuRIO5g5XkXbkrVHdeO4tKJL2RA4/iXXt1u/9j2QIAvBlQhp5bJyqw1vbFiLC6NMinbN z/4Iz0xOoZNWzXIcBhk4dve/I16eRA9onDiPPI/vhj5Jt0uMMA44P93bt+cjuKqQ8GKmgBLma9qbq T7XxYIi61AyqrpJQOt+3q1q7CmQt0yF3w3vcNN/42Uy2Rb97oEhF18cOIkiDFHZ+uQ6f9sdg4ZRdQ nwxcgQtsUbc0s+IVuoRVbvsSTehBKrIHdXJCPNltxAZA/KfaeqzXAXXkQpCBA0JAsmdY2hJfuAAp0 2uKV/Tzg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eHNuB-0002SA-Bj; Wed, 22 Nov 2017 05:49:03 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eHNu9-0002Ls-HC for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Nov 2017 05:49:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Nyq6ZXIzVfsQPzXTbXZ0eBZGbtmKDRTTWzr+ZgwrhEU=; b=NUA9Z36RK7jXa/14qZvqP47hr df7smGjNthZ59NUPQRs1BtlRqpST8HiZxf29UyV7ZmBQrkxM2XUzN5Qbj6VXKFYNKMtKZWYpjO29I 33DAOl6WPYnYGFyDW9e4E+F7fE2oE9DwiS9nCAClA9XWWF4WWrJ3Tk+xGAudYA85Tcc1zllXMODIF m/KY+6/uXQrFpPD0ePnFMqxMkWO7pWQafB83oq0ZTPI4UdCSkFTv7m/W6K0yK/vvLnfPz3Rxlvbrc R0RYzi1xpfHH5E/TRUKG20RpWYUCED/yoUDDYZlzSxzVq3oEWC4/FQk36Fkswz+/QzULBdu/tPZfP 3Jk1sTveA==; Received: from smtp.codeaurora.org ([198.145.29.96]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eHNeq-00085e-1g for linux-arm-kernel@lists.infradead.org; Wed, 22 Nov 2017 05:33:14 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A967A60925; Wed, 22 Nov 2017 05:32:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511328771; bh=UWPGvEfg8q/GzzsfpzPhrDgXRioWlqyVKql/OsJ6u9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MW50i/lu2Eqa2jYijOF5RQLFaa6VQoT0j3wO0QHSu2P4+MO+GDaspaM0ONhLrXSG7 1pJqy1fHcUZN4s2x0BvHA2TS17qO5LMD8r+ckGL2O56pZWMKnhmGQO/CwS7GX9uBz/ RJJSM9QxfIB713+AsuJ5lXa5wvzhHu+Ng5fLgy5g= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E9ABD60A08; Wed, 22 Nov 2017 05:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511328761; bh=UWPGvEfg8q/GzzsfpzPhrDgXRioWlqyVKql/OsJ6u9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gQTXrIsZ7j9jZrOfDLwK0wqodJtHMczDB35P6oR1JhmXwn/BJOd+81PtEG9MtuzBf RXKsk9HJPkSliyhfGM4K9DejcaJpRMeOtAU47aYyXJk3cFdu2OTRpKTGrgH6lCRHwd UTUnH6wWAmakoiy1xJsJbAMe+KU6GOgY4Pq/Exao= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E9ABD60A08 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 Subject: [PATCH 29/30] i7300_idle: deprecate pci_get_bus_and_slot() Date: Wed, 22 Nov 2017 00:31:14 -0500 Message-Id: <1511328675-21981-30-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171122_053312_309615_B19CDCC7 X-CRM114-Status: GOOD ( 15.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kate Stewart , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, open list , Sinan Kaya , Philippe Ombredanne , Thomas Gleixner , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- include/linux/i7300_idle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/i7300_idle.h b/include/linux/i7300_idle.h index 4dbe651..58cd9c6 100644 --- a/include/linux/i7300_idle.h +++ b/include/linux/i7300_idle.h @@ -48,7 +48,7 @@ static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev, int i; struct pci_dev *memdev, *dmadev; - memdev = pci_get_bus_and_slot(MEMCTL_BUS, MEMCTL_DEVFN); + memdev = pci_get_domain_bus_and_slot(0, MEMCTL_BUS, MEMCTL_DEVFN); if (!memdev) return -ENODEV; @@ -61,7 +61,7 @@ static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev, if (pci_tbl[i].vendor == 0) return -ENODEV; - dmadev = pci_get_bus_and_slot(IOAT_BUS, IOAT_DEVFN); + dmadev = pci_get_domain_bus_and_slot(0, IOAT_BUS, IOAT_DEVFN); if (!dmadev) return -ENODEV;