From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C9D51ED4F for ; Tue, 25 Jul 2023 11:39:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2105CC433C7; Tue, 25 Jul 2023 11:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1690285144; bh=j+v3QsP/XpV1WsNj0DsX6wNDFCtFCCRV9zl50xeswS0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zWxJ0LNLPPu0ssemSJ2JY4gh5H1OykL5hE7M2jXdYZFNWxwbFakBZUD47aEV3K+CZ SiFhNs3o9f7aSM5s/rvS30Hj4Dzx71LCGfcwiVGJkmi/d/V2v4CcPbLbPA6eki/+L7 /dbzFxdXI+C01lUlUH/m7yKd6dBXu+ge8AxrNmiM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sui Jingfeng , Bjorn Helgaas , Geert Uytterhoeven , Sasha Levin Subject: [PATCH 5.4 100/313] PCI: Add pci_clear_master() stub for non-CONFIG_PCI Date: Tue, 25 Jul 2023 12:44:13 +0200 Message-ID: <20230725104525.297737844@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230725104521.167250627@linuxfoundation.org> References: <20230725104521.167250627@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Sui Jingfeng [ Upstream commit 2aa5ac633259843f656eb6ecff4cf01e8e810c5e ] Add a pci_clear_master() stub when CONFIG_PCI is not set so drivers that support both PCI and platform devices don't need #ifdefs or extra Kconfig symbols for the PCI parts. [bhelgaas: commit log] Fixes: 6a479079c072 ("PCI: Add pci_clear_master() as opposite of pci_set_master()") Link: https://lore.kernel.org/r/20230531102744.2354313-1-suijingfeng@loongson.cn Signed-off-by: Sui Jingfeng Signed-off-by: Bjorn Helgaas Reviewed-by: Geert Uytterhoeven Signed-off-by: Sasha Levin --- include/linux/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/pci.h b/include/linux/pci.h index fc343d123127b..1cd5caa567cf5 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1687,6 +1687,7 @@ static inline struct pci_dev *pci_get_class(unsigned int class, #define pci_dev_put(dev) do { } while (0) static inline void pci_set_master(struct pci_dev *dev) { } +static inline void pci_clear_master(struct pci_dev *dev) { } static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } static inline void pci_disable_device(struct pci_dev *dev) { } static inline int pci_assign_resource(struct pci_dev *dev, int i) -- 2.39.2