ARM: shmobile: ape6evm: fix incorrect placement of __initdata tag
PATCH 1/1 ARM: shmobile: ape6evm: fix incorrect placement of __initdata tag
__initdata tag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section.
In this particular case __initdata is incorrect as ape6evm_keys_pdata can be used as a platform data for gpio-keys driver which can be compiled as module.
--- arch/arm/mach-shmobile/board-ape6evm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/board-ape6evm.c +1 -1
@@ -86,7 +86,7 @@ static struct gpio_keys_button gpio_buttons[] = { GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"), }; -static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = { +static struct gpio_keys_platform_data ape6evm_keys_pdata = { .buttons = gpio_buttons, .nbuttons =ARRAY_SIZE (gpio_buttons), };
Signature · 1 line
1.8.2.3
Hi Bartlomiej,
Thank you for the patch.
Quoted 6 lines · On Monday 30 September 2013 15:07:47 Bartlomiej Zolnierkiewicz wrote:
__initdatatag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section.In this particular case
__initdatais incorrect asape6evm_keys_pdatacan be used as a platform data for gpio-keys driver which can be compiled as module.
A pointer to the ape6evm_keys_pdata structure is passed to the platform_device_register_data() function, which makes a copy of the structure. Marking it as __initdata is thus correct.
Quoted 19 lines
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- arch/arm/mach-shmobile/board-ape6evm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm/mach-shmobile/board-ape6evm.cindex 7627385..8954f55 100644arch/arm/mach-shmobile/board-ape6evm.c +1
-1@@ -86,7 +86,7 @@ static struct gpio_keys_button gpio_buttons[] = { GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"), }; -static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = { +static struct gpio_keys_platform_data ape6evm_keys_pdata = { .buttons = gpio_buttons, .nbuttons =ARRAY_SIZE (gpio_buttons), };
Signature · 3 lines
Regards, Laurent Pinchart
Hi,
Quoted 8 lines · Laurent Pinchart
Hi Bartlomiej,
Thank you for the patch.
Quoted 3 lines · On Monday 30 September 2013 15:07:47 Bartlomiej Zolnierkiewicz wrote:
__initdatatag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section.
Quoted 7 lines
Quoted 3 lines
In this particular case
__initdatais incorrect asape6evm_keys_pdatacan be used as a platform data for gpio-keys driver which can be compiled as module.A pointer to the
ape6evm_keys_pdatastructure is passed to theplatform_device_register_data()function, which makes a copy of the structure. Marking it as__initdatais thus correct.
Thanks for catching this. I'll fix the patch and post v2.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Quoted 19 lines
Quoted 19 lines
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- arch/arm/mach-shmobile/board-ape6evm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm/mach-shmobile/board-ape6evm.cindex 7627385..8954f55 100644arch/arm/mach-shmobile/board-ape6evm.c +1
-1@@ -86,7 +86,7 @@ static struct gpio_keys_button gpio_buttons[] = { GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"), }; -static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = { +static struct gpio_keys_platform_data ape6evm_keys_pdata = { .buttons = gpio_buttons, .nbuttons =ARRAY_SIZE (gpio_buttons), };