diff options
Diffstat (limited to 'drivers/clk/sunxi/clk-sun9i-mmc.c')
-rw-r--r-- | drivers/clk/sunxi/clk-sun9i-mmc.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c b/drivers/clk/sunxi/clk-sun9i-mmc.c index 716737388b7d..6041bdba2e97 100644 --- a/drivers/clk/sunxi/clk-sun9i-mmc.c +++ b/drivers/clk/sunxi/clk-sun9i-mmc.c | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/clk-provider.h> | 18 | #include <linux/clk-provider.h> |
19 | #include <linux/module.h> | 19 | #include <linux/init.h> |
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/of_device.h> | 21 | #include <linux/of_device.h> |
22 | #include <linux/reset.h> | 22 | #include <linux/reset.h> |
@@ -183,39 +183,17 @@ err_clk_register: | |||
183 | return ret; | 183 | return ret; |
184 | } | 184 | } |
185 | 185 | ||
186 | static int sun9i_a80_mmc_config_clk_remove(struct platform_device *pdev) | ||
187 | { | ||
188 | struct device_node *np = pdev->dev.of_node; | ||
189 | struct sun9i_mmc_clk_data *data = platform_get_drvdata(pdev); | ||
190 | struct clk_onecell_data *clk_data = &data->clk_data; | ||
191 | int i; | ||
192 | |||
193 | reset_controller_unregister(&data->rcdev); | ||
194 | of_clk_del_provider(np); | ||
195 | for (i = 0; i < clk_data->clk_num; i++) | ||
196 | clk_unregister(clk_data->clks[i]); | ||
197 | |||
198 | reset_control_assert(data->reset); | ||
199 | |||
200 | return 0; | ||
201 | } | ||
202 | |||
203 | static const struct of_device_id sun9i_a80_mmc_config_clk_dt_ids[] = { | 186 | static const struct of_device_id sun9i_a80_mmc_config_clk_dt_ids[] = { |
204 | { .compatible = "allwinner,sun9i-a80-mmc-config-clk" }, | 187 | { .compatible = "allwinner,sun9i-a80-mmc-config-clk" }, |
205 | { /* sentinel */ } | 188 | { /* sentinel */ } |
206 | }; | 189 | }; |
207 | MODULE_DEVICE_TABLE(of, sun9i_a80_mmc_config_clk_dt_ids); | ||
208 | 190 | ||
209 | static struct platform_driver sun9i_a80_mmc_config_clk_driver = { | 191 | static struct platform_driver sun9i_a80_mmc_config_clk_driver = { |
210 | .driver = { | 192 | .driver = { |
211 | .name = "sun9i-a80-mmc-config-clk", | 193 | .name = "sun9i-a80-mmc-config-clk", |
194 | .suppress_bind_attrs = true, | ||
212 | .of_match_table = sun9i_a80_mmc_config_clk_dt_ids, | 195 | .of_match_table = sun9i_a80_mmc_config_clk_dt_ids, |
213 | }, | 196 | }, |
214 | .probe = sun9i_a80_mmc_config_clk_probe, | 197 | .probe = sun9i_a80_mmc_config_clk_probe, |
215 | .remove = sun9i_a80_mmc_config_clk_remove, | ||
216 | }; | 198 | }; |
217 | module_platform_driver(sun9i_a80_mmc_config_clk_driver); | 199 | builtin_platform_driver(sun9i_a80_mmc_config_clk_driver); |
218 | |||
219 | MODULE_AUTHOR("Chen-Yu Tsai <wens@csie.org>"); | ||
220 | MODULE_DESCRIPTION("Allwinner A80 MMC clock/reset Driver"); | ||
221 | MODULE_LICENSE("GPL v2"); | ||