Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib/devres.c: fix misplaced #endif

A misplaced #endif causes link errors related to pcim_*() functions.

This is because pcim_*() functions are related to CONFIG_PCI option,
however these are not related to CONFIG_HAS_IOPORT option. Therefore,
when CONFIG_PCI is enabled and CONFIG_HAS_IOPORT is not enabled, it makes
link errors related to pcim_*() functions as below:

drivers/ata/libata-sff.c:3233: undefined reference to `pcim_iomap_regions'
drivers/ata/libata-sff.c:3238: undefined reference to `pcim_iomap_table'
drivers/built-in.o: In function `ata_pci_sff_init_host':
drivers/ata/libata-sff.c:2318: undefined reference to `pcim_iomap_regions'
drivers/ata/libata-sff.c:2329: undefined reference to `pcim_iomap_table

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Greg KH <greg@kroah.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jingoo Han and committed by
Linus Torvalds
9ed8a30f a0031197

+1 -1
+1 -1
lib/devres.c
··· 227 227 devm_ioport_map_match, (void *)addr)); 228 228 } 229 229 EXPORT_SYMBOL(devm_ioport_unmap); 230 + #endif /* CONFIG_HAS_IOPORT */ 230 231 231 232 #ifdef CONFIG_PCI 232 233 /* ··· 433 432 } 434 433 EXPORT_SYMBOL(pcim_iounmap_regions); 435 434 #endif /* CONFIG_PCI */ 436 - #endif /* CONFIG_HAS_IOPORT */