From patchwork Tue Feb 3 01:37:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 5765901 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9AE649F380 for ; Tue, 3 Feb 2015 01:37:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1DBB20A37 for ; Tue, 3 Feb 2015 01:37:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D29BF20A2E for ; Tue, 3 Feb 2015 01:37:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933302AbbBCBhi (ORCPT ); Mon, 2 Feb 2015 20:37:38 -0500 Received: from mail-yh0-f41.google.com ([209.85.213.41]:42054 "EHLO mail-yh0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753806AbbBCBhi (ORCPT ); Mon, 2 Feb 2015 20:37:38 -0500 Received: by mail-yh0-f41.google.com with SMTP id f73so17375609yha.0 for ; Mon, 02 Feb 2015 17:37:37 -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=FnJz1Sivf42oUmev7bwWsURzP0jlOBo4UvNXuiDb7N0=; b=AZn46QGkO8XzZKNGerh5o+NxU0sO6A1Qt/qKBsld5D4fa7jIzej1umEw07FopsY1uU QzblCAp1Dr68rWGXGLMwmy1y9tzqmSCjgr1wQWr2/y9i+KYWu63iKZJxwIKJR6WaLnDC 3/D4Cv1rXw5cwkbMe1Q7HemEo6NRrtjgguH8TklQ94tK+9zezyEkrm0RjCcyt2DKO6ga BpVsr35wxYKchHFq6uxezvEzeMY5AaNFzUh0bKByzAu0iyyulzZZsVWxrIOcxZ8+rudy r2SAu4zLxmLTVESutxm5lClJGqrOVQlPGbljuB2jPsAmE83JoP16vRAxBycPW8sXTvgP zU5Q== X-Received: by 10.236.221.134 with SMTP id r6mr9028279yhp.137.1422927457821; Mon, 02 Feb 2015 17:37:37 -0800 (PST) Received: from pek-khao-d1.corp.ad.wrs.com ([106.120.101.38]) by mx.google.com with ESMTPSA id p29sm13361025yhp.36.2015.02.02.17.37.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Feb 2015 17:37:37 -0800 (PST) From: Kevin Hao To: Bjorn Helgaas Cc: Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org Subject: [PATCH v2 01/15] PCI: Add pci_device_to_OF_node() stub for !CONFIG_OF Date: Tue, 3 Feb 2015 09:37:24 +0800 Message-Id: <1422927444-31292-1-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1422923108.4625.2.camel@ellerman.id.au> References: <1422923108.4625.2.camel@ellerman.id.au> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a stub for pci_device_to_OF_node() so drivers don't need to use #ifdef CONFIG_OF around calls to it. Signed-off-by: Kevin Hao Acked-by: Bjorn Helgaas --- Hi Bjorn, Here is the revised version with the update of the subject and commit log in case that you want to take it for 3.20. Otherwise we will merge this version to powerpc tree during the 3.21 cycle. 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