ARM: SAMSUNG: Add __init attribute to functions calling s3c_set_platdata
Subsystems (3)
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
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
@@ -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
PATCH 1/4 ARM: EXYNOS: Add __init attribute to nuri_camera_init()
Quoted 8 lines · Tushar Behera
s3c_set_platdata()is defined with__initattribute, hence all functions referencing this function should also be defined with__initattribute.
nuri_camera_init()is referenced only in '__initnuri_machine_init()', thus this change won't put any additional constraint on the usage ofnuri_camera_init().Signed-off-by Tushar Behera <[email protected]>
Thanks.
PATCH 2/4 ARM: EXYNOS: Add __init attribute to universal_camera_init()
In reply to Tushar Beheras3c_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
@@ -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
PATCH 2/4 ARM: EXYNOS: Add __init attribute to universal_camera_init()
Quoted 8 lines · Tushar Behera
s3c_set_platdata()is defined with__initattribute, hence all functions referencing this function should also be defined with__initattribute.
universal_camera_init()is referenced only in '__inituniversal_machine_init()', thus this change won't put any additional constraint on the usage ofuniversal_camera_init().Signed-off-by Tushar Behera <[email protected]>
Thanks.
PATCH 3/4 ARM: SAMSUNG: Add __init attribute to samsung_bl_set()
In reply to Tushar Beheras3c_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
@@ -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
PATCH 4/4 ARM: SAMSUNG: Add __init attribute to xxx_set_platdata() wrappers
In reply to Tushar Beheras3c_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
@@ -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
cover ARM: SAMSUNG: Add __init attribute to functions calling s3c_set_platdata
In reply to Tushar BeheraQuoted 13 lines · Tushar Behera
The function
s3c_set_platdatais defined with__initattribute, hence the functions callings3c_set_platdatashould also be defined with__initattribute.Even though all the modified functions are called from
xxx_machine_init()functions, it is still better to define each of them with__initattribute.Tushar Behera (4):
ARM: EXYNOS: Add__initattribute tonuri_camera_init()
ARM: EXYNOS: Add__initattribute touniversal_camera_init()
ARM: SAMSUNG: Add__initattribute tosamsung_bl_set()
ARM: SAMSUNG: Add__initattribute toxxx_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.