From patchwork Sat Jan 31 13:47:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 435129 X-Patchwork-Delegate: michael@ellerman.id.au Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 08DA41402D9 for ; Sun, 1 Feb 2015 00:49:40 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id BE3A91A1267 for ; Sun, 1 Feb 2015 00:49:39 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-yh0-x232.google.com (mail-yh0-x232.google.com [IPv6:2607:f8b0:4002:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 6B07B1A0E46 for ; Sun, 1 Feb 2015 00:48:15 +1100 (AEDT) Received: by mail-yh0-f50.google.com with SMTP id t59so12938040yho.9 for ; Sat, 31 Jan 2015 05:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=X1wwwzWt0ZJdgmkCqcvxT3CDP7KikU/Oz9Zp5ESTFRM=; b=Nln3j+KljGdXRmx6mXD4R9Sp/RtlBXD2amJHKp37YPANovcXChYv085khWCn0oPt3N IEkFR/6AMPWGZuiCollmfRzrSFQ3MsOv8rmlueINlLk21vuFdvYogMhR30Jo7eWU+/NU AfUkkrhXr2I6sU99THJbdVZGY/Vw8Jv88f7EXlCtZ0intT5waAMVxN44ycm8NPZj3afD hA6JturDtbCeuy6+/S3CI9gDmt0iH5sUxzR+U0GEnTWGBpzPQxDVQpVgEl//LEBtG9fS cKlr6iORXrRI9isCzwDOAWuSq6HD0To7PZN8mKi/vwDe6UL7PXxP9kmGTTZYEM8IDykw IjWA== X-Received: by 10.236.208.72 with SMTP id p48mr5281494yho.1.1422712092940; Sat, 31 Jan 2015 05:48:12 -0800 (PST) Received: from pek-khao-d1.corp.ad.wrs.com ([106.120.101.38]) by mx.google.com with ESMTPSA id z23sm8423995yhz.35.2015.01.31.05.48.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Jan 2015 05:48:12 -0800 (PST) From: Kevin Hao To: linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org Subject: [PATCH 01/15] PCI: introduce pci_device_to_OF_node() for !CONFIG_OF Date: Sat, 31 Jan 2015 21:47:31 +0800 Message-Id: <1422712065-9403-2-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1422712065-9403-1-git-send-email-haokexin@gmail.com> References: <1422712065-9403-1-git-send-email-haokexin@gmail.com> Cc: Bjorn Helgaas , Kevin Hao X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" So we can avoid the ugly #ifdef in some drivers. Signed-off-by: Kevin Hao Acked-by: Bjorn Helgaas --- include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pci.h b/include/linux/pci.h index 8323cbf93913..421eb6a9e600 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1863,6 +1863,8 @@ static inline void pci_set_of_node(struct pci_dev *dev) { } static inline void pci_release_of_node(struct pci_dev *dev) { } static inline void pci_set_bus_of_node(struct pci_bus *bus) { } static inline void pci_release_bus_of_node(struct pci_bus *bus) { } +static inline struct device_node * +pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; } #endif /* CONFIG_OF */ #ifdef CONFIG_EEH