Skip to content

Commit 22ee670

Browse files
Uwe Kleine-Königlinusw
authored andcommitted
pinctrl: qcom/msm: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). To convert all those qcom pinctrl drivers, make msm_pinctrl_remove() return void (instead of zero) and use .remove_new in all drivers. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231009162510.335208-3-u.kleine-koenig@pengutronix.de Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 776d54c commit 22ee670

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+49
-51
lines changed

drivers/pinctrl/qcom/pinctrl-apq8064.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ static struct platform_driver apq8064_pinctrl_driver = {
629629
.of_match_table = apq8064_pinctrl_of_match,
630630
},
631631
.probe = apq8064_pinctrl_probe,
632-
.remove = msm_pinctrl_remove,
632+
.remove_new = msm_pinctrl_remove,
633633
};
634634

635635
static int __init apq8064_pinctrl_init(void)

drivers/pinctrl/qcom/pinctrl-apq8084.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ static struct platform_driver apq8084_pinctrl_driver = {
12071207
.of_match_table = apq8084_pinctrl_of_match,
12081208
},
12091209
.probe = apq8084_pinctrl_probe,
1210-
.remove = msm_pinctrl_remove,
1210+
.remove_new = msm_pinctrl_remove,
12111211
};
12121212

12131213
static int __init apq8084_pinctrl_init(void)

drivers/pinctrl/qcom/pinctrl-ipq4019.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static struct platform_driver ipq4019_pinctrl_driver = {
710710
.of_match_table = ipq4019_pinctrl_of_match,
711711
},
712712
.probe = ipq4019_pinctrl_probe,
713-
.remove = msm_pinctrl_remove,
713+
.remove_new = msm_pinctrl_remove,
714714
};
715715

716716
static int __init ipq4019_pinctrl_init(void)

drivers/pinctrl/qcom/pinctrl-ipq5018.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ static struct platform_driver ipq5018_pinctrl_driver = {
754754
.of_match_table = ipq5018_pinctrl_of_match,
755755
},
756756
.probe = ipq5018_pinctrl_probe,
757-
.remove = msm_pinctrl_remove,
757+
.remove_new = msm_pinctrl_remove,
758758
};
759759

760760
static int __init ipq5018_pinctrl_init(void)

drivers/pinctrl/qcom/pinctrl-ipq5332.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ static struct platform_driver ipq5332_pinctrl_driver = {
834834
.of_match_table = ipq5332_pinctrl_of_match,
835835
},
836836
.probe = ipq5332_pinctrl_probe,
837-
.remove = msm_pinctrl_remove,
837+
.remove_new = msm_pinctrl_remove,
838838
};
839839

840840
static int __init ipq5332_pinctrl_init(void)

drivers/pinctrl/qcom/pinctrl-ipq6018.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ static struct platform_driver ipq6018_pinctrl_driver = {
10801080
.of_match_table = ipq6018_pinctrl_of_match,
10811081
},
10821082
.probe = ipq6018_pinctrl_probe,
1083-
.remove = msm_pinctrl_remove,
1083+
.remove_new = msm_pinctrl_remove,
10841084
};
10851085

10861086
static int __init ipq6018_pinctrl_init(void)

drivers/pinctrl/qcom/pinctrl-ipq8064.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ static struct platform_driver ipq8064_pinctrl_driver = {
631631
.of_match_table = ipq8064_pinctrl_of_match,
632632
},
633633
.probe = ipq8064_pinctrl_probe,
634-
.remove = msm_pinctrl_remove,
634+
.remove_new = msm_pinctrl_remove,
635635
};
636636

637637
static int __init ipq8064_pinctrl_init(void)

drivers/pinctrl/qcom/pinctrl-ipq8074.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ static struct platform_driver ipq8074_pinctrl_driver = {
10411041
.of_match_table = ipq8074_pinctrl_of_match,
10421042
},
10431043
.probe = ipq8074_pinctrl_probe,
1044-
.remove = msm_pinctrl_remove,
1044+
.remove_new = msm_pinctrl_remove,
10451045
};
10461046

10471047
static int __init ipq8074_pinctrl_init(void)

drivers/pinctrl/qcom/pinctrl-ipq9574.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ static struct platform_driver ipq9574_pinctrl_driver = {
799799
.of_match_table = ipq9574_pinctrl_of_match,
800800
},
801801
.probe = ipq9574_pinctrl_probe,
802-
.remove = msm_pinctrl_remove,
802+
.remove_new = msm_pinctrl_remove,
803803
};
804804

805805
static int __init ipq9574_pinctrl_init(void)

drivers/pinctrl/qcom/pinctrl-mdm9607.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ static struct platform_driver mdm9607_pinctrl_driver = {
10591059
.of_match_table = mdm9607_pinctrl_of_match,
10601060
},
10611061
.probe = mdm9607_pinctrl_probe,
1062-
.remove = msm_pinctrl_remove,
1062+
.remove_new = msm_pinctrl_remove,
10631063
};
10641064

10651065
static int __init mdm9607_pinctrl_init(void)

0 commit comments

Comments
 (0)