amlogic: Remove __init from probe functions 05/290205/2
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 21 Mar 2023 10:41:51 +0000 (19:41 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 22 Mar 2023 00:54:00 +0000 (00:54 +0000)
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 <sw0312.kim@samsung.com>
drivers/amlogic/media/camera/common/cam_prober.c
drivers/amlogic/memory_ext/watch_point.c
drivers/amlogic/pm/gx_pm.c
drivers/amlogic/pm/m8b_pm.c

index 107e95a..141032c 100644 (file)
@@ -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];
index 35b4a05..1e9fb56 100644 (file)
@@ -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;
 
index 0ea41c5..fee0f72 100644 (file)
@@ -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;
index a4f4051..c659646 100644 (file)
@@ -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