From patchwork Sat Mar 3 20:05:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 7080 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4F3D524594 for ; Sat, 3 Mar 2012 20:05:17 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 0C19DA18665 for ; Sat, 3 Mar 2012 20:05:16 +0000 (UTC) Received: by iage36 with SMTP id e36so5167180iag.11 for ; Sat, 03 Mar 2012 12:05:16 -0800 (PST) Received: by 10.50.95.230 with SMTP id dn6mr2079603igb.0.1330805116374; Sat, 03 Mar 2012 12:05:16 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.53.18 with SMTP id k18csp11788ibg; Sat, 3 Mar 2012 12:05:15 -0800 (PST) Received: by 10.152.113.136 with SMTP id iy8mr10702264lab.50.1330805114331; Sat, 03 Mar 2012 12:05:14 -0800 (PST) Received: from mail.df.lth.se (mail.df.lth.se. [194.47.250.12]) by mx.google.com with ESMTPS id tq3si1581672lab.18.2012.03.03.12.05.13 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 03 Mar 2012 12:05:14 -0800 (PST) Received-SPF: neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=194.47.250.12; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) smtp.mail=linus.walleij@linaro.org Received: from fecusia (c83-249-219-176.bredband.comhem.se [83.249.219.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPSA id 4E8D165D8E; Sat, 3 Mar 2012 21:05:11 +0100 (CET) Received: by fecusia (sSMTP sendmail emulation); Sat, 3 Mar 2012 21:05:10 +0100 From: "Linus Walleij" To: u-boot@lists.denx.de, Wolfgang Denk Cc: Albert ARIBAUD , Linus Walleij Subject: [PATCH] pci: move pciauto_config_init() to pci.h Date: Sat, 3 Mar 2012 21:05:08 +0100 Message-Id: <1330805108-24007-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.7.6 X-Gm-Message-State: ALoCoQkX/UBVJqzRqxQj8aD1Q0368zOGJT2mQhF07V5K/1PHS4QBUlJUwUUTX41ffB9BnMkb62dC Fixing build regressions for the Integrator I get find that a few boards try to work around the missing declaration of pciauto_config_init() by declaring it in the local scope. This does not make sense when the sibling functions are in so move the function to the header, ridding the build error in the Integrator and getting rid of the local declarations here and there. Reported-by: Wolfgang Denk Signed-off-by: Linus Walleij --- board/esd/cpci750/pci.c | 1 - board/prodrive/p3mx/pci.c | 1 - drivers/pci/fsl_pci_init.c | 1 - drivers/pci/pci.c | 1 - include/pci.h | 1 + 5 files changed, 1 insertions(+), 4 deletions(-) diff --git a/board/esd/cpci750/pci.c b/board/esd/cpci750/pci.c index a2c1c50..24ab13f 100644 --- a/board/esd/cpci750/pci.c +++ b/board/esd/cpci750/pci.c @@ -29,7 +29,6 @@ #include #ifdef CONFIG_PCI_PNP -void pciauto_config_init(struct pci_controller *hose); int pciauto_region_allocate(struct pci_region* res, unsigned int size, unsigned int *bar); #endif diff --git a/board/prodrive/p3mx/pci.c b/board/prodrive/p3mx/pci.c index e36b676..712c21c 100644 --- a/board/prodrive/p3mx/pci.c +++ b/board/prodrive/p3mx/pci.c @@ -29,7 +29,6 @@ #include #ifdef CONFIG_PCI_PNP -void pciauto_config_init(struct pci_controller *hose); int pciauto_region_allocate(struct pci_region* res, unsigned int size, unsigned int *bar); #endif diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index bff1314..d04a08c 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -51,7 +51,6 @@ void pciauto_prescan_setup_bridge(struct pci_controller *hose, pci_dev_t dev, int sub_bus); void pciauto_postscan_setup_bridge(struct pci_controller *hose, pci_dev_t dev, int sub_bus); -void pciauto_config_init(struct pci_controller *hose); #ifndef CONFIG_SYS_PCI_MEMORY_BUS #define CONFIG_SYS_PCI_MEMORY_BUS 0 diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index bee2b52..007b850 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -518,7 +518,6 @@ void pci_cfgfunc_do_nothing(struct pci_controller *hose, * to get the correct result when scanning bridges */ extern int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev); -extern void pciauto_config_init(struct pci_controller *hose); #if defined(CONFIG_CMD_PCI) || defined(CONFIG_PCI_SCAN_SHOW) const char * pci_class_str(u8 class) diff --git a/include/pci.h b/include/pci.h index 1284c42..7d98ad4 100644 --- a/include/pci.h +++ b/include/pci.h @@ -527,6 +527,7 @@ extern void pciauto_setup_device(struct pci_controller *hose, struct pci_region *mem, struct pci_region *prefetch, struct pci_region *io); +extern void pciauto_config_init(struct pci_controller *hose); int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev); extern pci_dev_t pci_find_device (unsigned int vendor, unsigned int device, int index);