diff options
author | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2017-05-29 11:45:53 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2017-07-06 03:29:12 -0400 |
commit | c42a8edbe95db8106a68d7680c8379c4f80d9845 (patch) | |
tree | c56168cd434dc7db7652dc731bc66dde040a1ad8 | |
parent | acebcff9eda8c38fd78acbfb9fab555b3a2ba5eb (diff) |
mfd: stm32-timers: Use devm_of_platform_populate()
Use devm_of_platform_populate() instead of of_platform_populate()
and suppress stm32_timers_remove() which become useless.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/stm32-timers.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c index 2182f00db101..a6675a449409 100644 --- a/drivers/mfd/stm32-timers.c +++ b/drivers/mfd/stm32-timers.c | |||
@@ -58,14 +58,7 @@ static int stm32_timers_probe(struct platform_device *pdev) | |||
58 | 58 | ||
59 | platform_set_drvdata(pdev, ddata); | 59 | platform_set_drvdata(pdev, ddata); |
60 | 60 | ||
61 | return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); | 61 | return devm_of_platform_populate(&pdev->dev); |
62 | } | ||
63 | |||
64 | static int stm32_timers_remove(struct platform_device *pdev) | ||
65 | { | ||
66 | of_platform_depopulate(&pdev->dev); | ||
67 | |||
68 | return 0; | ||
69 | } | 62 | } |
70 | 63 | ||
71 | static const struct of_device_id stm32_timers_of_match[] = { | 64 | static const struct of_device_id stm32_timers_of_match[] = { |
@@ -76,7 +69,6 @@ MODULE_DEVICE_TABLE(of, stm32_timers_of_match); | |||
76 | 69 | ||
77 | static struct platform_driver stm32_timers_driver = { | 70 | static struct platform_driver stm32_timers_driver = { |
78 | .probe = stm32_timers_probe, | 71 | .probe = stm32_timers_probe, |
79 | .remove = stm32_timers_remove, | ||
80 | .driver = { | 72 | .driver = { |
81 | .name = "stm32-timers", | 73 | .name = "stm32-timers", |
82 | .of_match_table = stm32_timers_of_match, | 74 | .of_match_table = stm32_timers_of_match, |