Skip to content

Commit

Permalink
ARM: 6265/1: kirkwood: move qnap_tsx1x_register_flash() to .init.text
Browse files Browse the repository at this point in the history
qnap_tsx1x_register_flash is only called by qnap_ts219_init and
qnap_ts41x_init which both live in .init.text, too.  So the move is OK.

This fixes the following warning in kirkwood_defconfig:
	WARNING: vmlinux.o(.text+0x9334): Section mismatch in reference from the function qnap_tsx1x_register_flash() to the variable .init.data:qnap_tsx1x_spi_slave_info
	The function qnap_tsx1x_register_flash() references
	the variable __initdata qnap_tsx1x_spi_slave_info.
	This is often because qnap_tsx1x_register_flash lacks a __initdata
	annotation or the annotation of qnap_tsx1x_spi_slave_info is wrong.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Uwe Kleine-König authored and Russell King committed Jul 26, 2010
1 parent 51aa87b commit f9578fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-kirkwood/tsx1x-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct spi_board_info __initdata qnap_tsx1x_spi_slave_info[] = {
},
};

void qnap_tsx1x_register_flash(void)
void __init qnap_tsx1x_register_flash(void)
{
spi_register_board_info(qnap_tsx1x_spi_slave_info,
ARRAY_SIZE(qnap_tsx1x_spi_slave_info));
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-kirkwood/tsx1x-common.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef __ARCH_KIRKWOOD_TSX1X_COMMON_H
#define __ARCH_KIRKWOOD_TSX1X_COMMON_H

extern void qnap_tsx1x_register_flash(void);
extern void __init qnap_tsx1x_register_flash(void);
extern void qnap_tsx1x_power_off(void);

#endif

0 comments on commit f9578fc

Please sign in to comment.