aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/pci/ops-dreamcast.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-03-11 02:46:14 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-04-16 03:00:12 -0400
commitd0e3db40e2a1352aa2a2f425a7d4631bddc03d51 (patch)
tree275392db569a7f3808d8f86cfcb4874bfe81f997 /arch/sh/drivers/pci/ops-dreamcast.c
parentb8b47bfbe4eb1ae0e6891e49c86a5f4fb00413be (diff)
sh: add init member to pci_channel data
This patch adds an init callback to struct pci_channel and makes sure it is initialized properly. Code is added to call this init function from pcibios_init(). Return values are adjusted and a warning is is printed if init fails. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/ops-dreamcast.c')
-rw-r--r--arch/sh/drivers/pci/ops-dreamcast.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/sh/drivers/pci/ops-dreamcast.c b/arch/sh/drivers/pci/ops-dreamcast.c
index f5d2a2aa6f3f..f62063eb6490 100644
--- a/arch/sh/drivers/pci/ops-dreamcast.c
+++ b/arch/sh/drivers/pci/ops-dreamcast.c
@@ -42,15 +42,6 @@ static struct resource gapspci_mem_resource = {
42 .flags = IORESOURCE_MEM, 42 .flags = IORESOURCE_MEM,
43}; 43};
44 44
45static struct pci_ops gapspci_pci_ops;
46
47struct pci_channel board_pci_channels[] = {
48 { &gapspci_pci_ops, &gapspci_io_resource,
49 &gapspci_mem_resource, 0, 1 },
50 { 0, }
51};
52EXPORT_SYMBOL(board_pci_channels);
53
54/* 45/*
55 * The !gapspci_config_access case really shouldn't happen, ever, unless 46 * The !gapspci_config_access case really shouldn't happen, ever, unless
56 * someone implicitly messes around with the last devfn value.. otherwise we 47 * someone implicitly messes around with the last devfn value.. otherwise we
@@ -116,7 +107,7 @@ static struct pci_ops gapspci_pci_ops = {
116 * gapspci init 107 * gapspci init
117 */ 108 */
118 109
119int __init gapspci_init(void) 110static int __init gapspci_init(struct pci_channel *chan)
120{ 111{
121 char idbuf[16]; 112 char idbuf[16];
122 int i; 113 int i;
@@ -168,3 +159,10 @@ char * __devinit pcibios_setup(char *str)
168{ 159{
169 return str; 160 return str;
170} 161}
162
163struct pci_channel board_pci_channels[] = {
164 { gapspci_init, &gapspci_pci_ops, &gapspci_io_resource,
165 &gapspci_mem_resource, 0, 1 },
166 { 0, }
167};
168EXPORT_SYMBOL(board_pci_channels);