Skip to content

Commit 6a72015

Browse files
committed
MIPS: SNI: pcit: Fix build error with CONFIG_PCI=n disabled.
CC arch/mips/sni/pcit.o arch/mips/sni/pcit.c:150:30: warning: ‘sni_pcit_controller’ defined but not used [-Wunused-variable] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 5bd8076 commit 6a72015

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎arch/mips/sni/pcit.c‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,6 @@ static struct resource pcit_io_resources[] = {
128128
}
129129
};
130130

131-
static struct resource sni_mem_resource = {
132-
.start = 0x18000000UL,
133-
.end = 0x1fbfffffUL,
134-
.name = "PCIT PCI MEM",
135-
.flags = IORESOURCE_MEM
136-
};
137-
138131
static void __init sni_pcit_resource_init(void)
139132
{
140133
int i;
@@ -147,6 +140,14 @@ static void __init sni_pcit_resource_init(void)
147140

148141
extern struct pci_ops sni_pcit_ops;
149142

143+
#ifdef CONFIG_PCI
144+
static struct resource sni_mem_resource = {
145+
.start = 0x18000000UL,
146+
.end = 0x1fbfffffUL,
147+
.name = "PCIT PCI MEM",
148+
.flags = IORESOURCE_MEM
149+
};
150+
150151
static struct pci_controller sni_pcit_controller = {
151152
.pci_ops = &sni_pcit_ops,
152153
.mem_resource = &sni_mem_resource,
@@ -155,6 +156,7 @@ static struct pci_controller sni_pcit_controller = {
155156
.io_offset = 0x00000000UL,
156157
.io_map_base = SNI_PORT_BASE
157158
};
159+
#endif /* CONFIG_PCI */
158160

159161
static void enable_pcit_irq(struct irq_data *d)
160162
{

0 commit comments

Comments
 (0)