Skip to contentSkip to conversation

ARM: SAMSUNG: Add __init attribute to functions calling s3c_set_platdata

PATCH New Tushar Behera 3 participants 8 messages Mar 1, 2012 – Mar 9, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ARM: SAMSUNG: Add __init attribute to functions calling s3c_set_platdata

The function s3c_set_platdata is defined with __init attribute, hence the functions calling s3c_set_platdata should also be defined with __init attribute.

Even though all the modified functions are called from xxx_machine_init() functions, it is still better to define each of them with __init attribute.

Tushar Behera (4):
ARM: EXYNOS: Add __init attribute to nuri_camera_init()
ARM: EXYNOS: Add __init attribute to universal_camera_init()
ARM: SAMSUNG: Add __init attribute to samsung_bl_set()
ARM: SAMSUNG: Add __init attribute to xxx_set_platdata() wrappers

 arch/arm/mach-exynos/mach-nuri.c           |    2 +-
 arch/arm/mach-exynos/mach-universal_c210.c |    2 +-
 arch/arm/plat-samsung/dev-backlight.c      |    2 +-
 arch/arm/plat-samsung/devs.c               |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/4 ARM: EXYNOS: Add __init attribute to nuri_camera_init()

s3c_set_platdata() is defined with __init attribute, hence all functions referencing this function should also be defined with __init attribute.

nuri_camera_init() is referenced only in '__init nuri_machine_init()', thus this change won't put any additional constraint on the usage of nuri_camera_init().

---
 arch/arm/mach-exynos/mach-nuri.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-exynos/mach-nuri.c +1 -1
index a6b9162..7dc5c99 100644
@@ -1255,7 +1255,7 @@ static struct gpio nuri_camera_gpios[] = {
 	{ GPIO_CAM_MEGA_RST,	GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" },
 };
 
-static void nuri_camera_init(void)
+static void __init nuri_camera_init(void)
 {
 	s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
 			 &s5p_device_mipi_csis0);
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 1/4 ARM: EXYNOS: Add __init attribute to nuri_camera_init()

Quoted 8 lines · Tushar Behera

s3c_set_platdata() is defined with __init attribute, hence all functions referencing this function should also be defined with __init attribute.

nuri_camera_init() is referenced only in '__init nuri_machine_init()', thus this change won't put any additional constraint on the usage of nuri_camera_init().

Thanks.

#3 lore raw

PATCH 2/4 ARM: EXYNOS: Add __init attribute to universal_camera_init()

In reply to Tushar Behera

s3c_set_platdata() is defined with __init attribute, hence all functions referencing this function should also be defined with __init attribute.

universal_camera_init() is referenced only in '__init universal_machine_init()', thus this change won't put any additional constraint on the usage of universal_camera_init().

---
 arch/arm/mach-exynos/mach-universal_c210.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-exynos/mach-universal_c210.c +1 -1
index 6017a21..be50e5e 100644
@@ -990,7 +990,7 @@ static struct gpio universal_camera_gpios[] = {
 	{ GPIO_CAM_VGA_NSTBY,	GPIOF_OUT_INIT_LOW,  "CAM_VGA_NSTBY" },
 };
 
-static void universal_camera_init(void)
+static void __init universal_camera_init(void)
 {
 	s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
 			 &s5p_device_mipi_csis0);
Signature · 1 line
1.7.4.1
#4 lore raw

PATCH 2/4 ARM: EXYNOS: Add __init attribute to universal_camera_init()

Quoted 8 lines · Tushar Behera

s3c_set_platdata() is defined with __init attribute, hence all functions referencing this function should also be defined with __init attribute.

universal_camera_init() is referenced only in '__init universal_machine_init()', thus this change won't put any additional constraint on the usage of universal_camera_init().

Thanks.

#5 lore raw

PATCH 3/4 ARM: SAMSUNG: Add __init attribute to samsung_bl_set()

In reply to Tushar Behera

s3c_set_platdata() is defined with __init attribute, hence all functions referencing this function should also be defined with __init attribute.

samsung_bl_set() is referenced only in '__init xxx_machine_init()' functions, thus this change won't put any additional constraint on the usage of samsung_bl_set().

---
 arch/arm/plat-samsung/dev-backlight.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-samsung/dev-backlight.c +1 -1
index 2254920..5f197dc 100644
@@ -77,7 +77,7 @@ static struct platform_device samsung_dfl_bl_device __initdata = {
  * @gpio_info:	structure containing GPIO info for PWM timer
  * @bl_data:	structure containing Backlight control data
  */
-void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
+void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
 	struct platform_pwm_backlight_data *bl_data)
 {
 	int ret = 0;
Signature · 1 line
1.7.4.1
#6 lore raw

PATCH 4/4 ARM: SAMSUNG: Add __init attribute to xxx_set_platdata() wrappers

In reply to Tushar Behera

s3c_set_platdata() is defined with __init attribute, hence all functions referencing this function should also be defined with __init attribute.

---
 arch/arm/plat-samsung/devs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-samsung/devs.c +2 -2
index 75ff3b0..b7d4cdc 100644
@@ -782,7 +782,7 @@ struct platform_device s3c_device_cfcon = {
 	.resource	= s3c_cfcon_resource,
 };
 
-void s3c_ide_set_platdata(struct s3c_ide_platdata *pdata)
+void __init s3c_ide_set_platdata(struct s3c_ide_platdata *pdata)
 {
 	s3c_set_platdata(pdata, sizeof(struct s3c_ide_platdata),
 			 &s3c_device_cfcon);
@@ -1062,7 +1062,7 @@ struct platform_device s3c64xx_device_onenand1 = {
 	.resource	= s3c64xx_onenand1_resources,
 };
 
-void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata)
+void __init s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata)
 {
 	s3c_set_platdata(pdata, sizeof(struct onenand_platform_data),
 			 &s3c64xx_device_onenand1);
Signature · 1 line
1.7.4.1
#7 lore raw

cover ARM: SAMSUNG: Add __init attribute to functions calling s3c_set_platdata

In reply to Tushar Behera
Quoted 13 lines · Tushar Behera

The function s3c_set_platdata is defined with __init attribute, hence the functions calling s3c_set_platdata should also be defined with __init attribute.

Even though all the modified functions are called from xxx_machine_init() functions, it is still better to define each of them with __init attribute.

Tushar Behera (4):
ARM: EXYNOS: Add __init attribute to nuri_camera_init()
ARM: EXYNOS: Add __init attribute to universal_camera_init()
ARM: SAMSUNG: Add __init attribute to samsung_bl_set()
ARM: SAMSUNG: Add __init attribute to xxx_set_platdata() wrappers

Quoted 6 lines
  arch/arm/mach-exynos/mach-nuri.c           |    2 +-
  arch/arm/mach-exynos/mach-universal_c210.c |    2 +-
  arch/arm/plat-samsung/dev-backlight.c      |    2 +-
  arch/arm/plat-samsung/devs.c               |    4 ++--
  4 files changed, 5 insertions(+), 5 deletions(-)

Looks good to me, applied.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.