Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f69a181 authored by Felipe Balbi's avatar Felipe Balbi Committed by Tony Lindgren
Browse files

omap2/3/4: ehci: avoid compiler error with touchbook



the early_param() call in board-omap3touchbook.c expands to:

static const char __setup_str_early_touchbook_revision[]
	__section(.init.rodata) _aligned(1) = tbr;
[...]

and we have a non-const variable being added to the
same section:

static struct ehci_hcd_omap_platform_data ehci_pdata
__section(.init.rodata);

because of that, gcc generates a section type conflict
which can (and actually should) be avoided by marking
const every variable marked with __initconst.

This patch fixes that for the ehci_hdc_omap_platform_data.

Signed-off-by: default avatarFelipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent d2197e1e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -648,7 +648,7 @@ static void enable_board_wakeup_source(void)
		OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}

static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {

	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ static void enable_board_wakeup_source(void)
		OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}

static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {

	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+1 −1
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ static void __init am3517_evm_init_irq(void)
	omap_gpio_init();
}

static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+1 −1
Original line number Diff line number Diff line
@@ -612,7 +612,7 @@ static struct omap2_hsmmc_info mmc[] = {
	{}	/* Terminator */
};

static struct ehci_hcd_omap_platform_data ehci_pdata = {
static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+1 −1
Original line number Diff line number Diff line
@@ -636,7 +636,7 @@ static struct omap_musb_board_data musb_board_data = {
	.power			= 100,
};

static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {

	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
Loading