From: Seung-Woo Kim Date: Tue, 21 Mar 2023 10:41:51 +0000 (+0900) Subject: amlogic: Remove __init from probe functions X-Git-Tag: accepted/tizen/unified/20230322.164707~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=680e6e5f8b58d314b7cf1f6e09b07aefe04d10a7;p=platform%2Fkernel%2Flinux-amlogic.git amlogic: Remove __init from probe functions Driver probe function can be run several times if it is built as module, so it should not be __init function. Remove __init macro from probe functions from amlogic drivers. Change-Id: I59a0b29294a7c450a201e891666240f9704b91ce Signed-off-by: Seung-Woo Kim --- diff --git a/drivers/amlogic/media/camera/common/cam_prober.c b/drivers/amlogic/media/camera/common/cam_prober.c index 107e95aebc1f..141032cdd7d7 100644 --- a/drivers/amlogic/media/camera/common/cam_prober.c +++ b/drivers/amlogic/media/camera/common/cam_prober.c @@ -570,7 +570,7 @@ int bf3720_v4l2_probe(struct i2c_adapter *adapter) } #endif #ifdef CONFIG_AMLOGIC_VIDEO_CAPTURE_BF3703 -int __init bf3703_v4l2_probe(struct i2c_adapter *adapter) +int bf3703_v4l2_probe(struct i2c_adapter *adapter) { int ret = 0; unsigned char reg[2]; @@ -583,7 +583,7 @@ int __init bf3703_v4l2_probe(struct i2c_adapter *adapter) } #endif #ifdef CONFIG_AMLOGIC_VIDEO_CAPTURE_BF3920 -int __init bf3920_v4l2_probe(struct i2c_adapter *adapter) +int bf3920_v4l2_probe(struct i2c_adapter *adapter) { int ret = 0; unsigned char reg[2]; @@ -596,7 +596,7 @@ int __init bf3920_v4l2_probe(struct i2c_adapter *adapter) } #endif #ifdef CONFIG_AMLOGIC_VIDEO_CAPTURE_GC2145 -int __init gc2145_v4l2_probe(struct i2c_adapter *adapter) +int gc2145_v4l2_probe(struct i2c_adapter *adapter) { int ret = 0; unsigned char reg[2]; @@ -612,7 +612,7 @@ int __init gc2145_v4l2_probe(struct i2c_adapter *adapter) #endif #ifdef CONFIG_AMLOGIC_VIDEO_CAPTURE_GC2145_MIPI -int __init gc2145_mipi_v4l2_probe(struct i2c_adapter *adapter) +int gc2145_mipi_v4l2_probe(struct i2c_adapter *adapter) { int ret = 0; unsigned char reg[2]; diff --git a/drivers/amlogic/memory_ext/watch_point.c b/drivers/amlogic/memory_ext/watch_point.c index 35b4a050b613..1e9fb569e5c2 100644 --- a/drivers/amlogic/memory_ext/watch_point.c +++ b/drivers/amlogic/memory_ext/watch_point.c @@ -407,12 +407,7 @@ static struct class watch_point_class = { .class_attrs = watch_point_attr, }; -/* - * aml_watch_point_probe only executes before the init process starts - * to run, so add __ref to indicate it is okay to call __init function - * hook_debug_fault_code - */ -static int __init aml_watch_point_probe(struct platform_device *pdev) +static int aml_watch_point_probe(struct platform_device *pdev) { int r; diff --git a/drivers/amlogic/pm/gx_pm.c b/drivers/amlogic/pm/gx_pm.c index 0ea41c52470f..fee0f725f3d9 100644 --- a/drivers/amlogic/pm/gx_pm.c +++ b/drivers/amlogic/pm/gx_pm.c @@ -215,7 +215,7 @@ ssize_t time_out_store(struct device *dev, struct device_attribute *attr, DEVICE_ATTR(time_out, 0664, time_out_show, time_out_store); -static int __init meson_pm_probe(struct platform_device *pdev) +static int meson_pm_probe(struct platform_device *pdev) { struct device_node *cpu_node; struct device_node *state_node; diff --git a/drivers/amlogic/pm/m8b_pm.c b/drivers/amlogic/pm/m8b_pm.c index a4f4051522b6..c6596462e4f3 100644 --- a/drivers/amlogic/pm/m8b_pm.c +++ b/drivers/amlogic/pm/m8b_pm.c @@ -291,7 +291,7 @@ static const struct platform_freeze_ops meson_m8b_frz_ops = { .end = frz_end, }; -static int __init meson_pm_probe(struct platform_device *pdev) +static int meson_pm_probe(struct platform_device *pdev) { pr_info("enter meson_pm_probe!\n"); #ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND