mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
ASoc: Another series to convert to struct
Merge series from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>: This is another series to convert ASoC drivers to use struct platform_driver:remove_new(). The rockchip one was already send before but with a wrong subject prefix, the cs42l43 driver is newer than the last series. The remaining five patches are for driver combos that my coccinelle patch failed to detect before.
This commit is contained in:
commit
61f85372d2
24 changed files with 27 additions and 41 deletions
|
@ -188,7 +188,7 @@ int simple_util_init_aux_jacks(struct simple_util_priv *priv,
|
|||
char *prefix);
|
||||
int simple_util_init_priv(struct simple_util_priv *priv,
|
||||
struct link_info *li);
|
||||
int simple_util_remove(struct platform_device *pdev);
|
||||
void simple_util_remove(struct platform_device *pdev);
|
||||
|
||||
int graph_util_card_probe(struct snd_soc_card *card);
|
||||
int graph_util_is_ports0(struct device_node *port);
|
||||
|
|
|
@ -2232,13 +2232,11 @@ static int cs42l43_codec_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int cs42l43_codec_remove(struct platform_device *pdev)
|
||||
static void cs42l43_codec_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct cs42l43_codec *priv = platform_get_drvdata(pdev);
|
||||
|
||||
clk_put(priv->mclk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cs42l43_codec_runtime_resume(struct device *dev)
|
||||
|
@ -2269,7 +2267,7 @@ static struct platform_driver cs42l43_codec_driver = {
|
|||
},
|
||||
|
||||
.probe = cs42l43_codec_probe,
|
||||
.remove = cs42l43_codec_remove,
|
||||
.remove_new = cs42l43_codec_remove,
|
||||
.id_table = cs42l43_codec_id_table,
|
||||
};
|
||||
module_platform_driver(cs42l43_codec_driver);
|
||||
|
|
|
@ -644,7 +644,7 @@ static struct platform_driver graph_card = {
|
|||
.of_match_table = graph_of_match,
|
||||
},
|
||||
.probe = graph_probe,
|
||||
.remove = simple_util_remove,
|
||||
.remove_new = simple_util_remove,
|
||||
};
|
||||
module_platform_driver(graph_card);
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ static struct platform_driver custom_card = {
|
|||
.of_match_table = custom_of_match,
|
||||
},
|
||||
.probe = custom_probe,
|
||||
.remove = simple_util_remove,
|
||||
.remove_new = simple_util_remove,
|
||||
};
|
||||
module_platform_driver(custom_card);
|
||||
|
||||
|
|
|
@ -1224,7 +1224,7 @@ static struct platform_driver graph_card = {
|
|||
.of_match_table = graph_of_match,
|
||||
},
|
||||
.probe = graph_probe,
|
||||
.remove = simple_util_remove,
|
||||
.remove_new = simple_util_remove,
|
||||
};
|
||||
module_platform_driver(graph_card);
|
||||
|
||||
|
|
|
@ -958,13 +958,11 @@ int simple_util_init_priv(struct simple_util_priv *priv,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(simple_util_init_priv);
|
||||
|
||||
int simple_util_remove(struct platform_device *pdev)
|
||||
void simple_util_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
||||
|
||||
simple_util_clean_reference(card);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(simple_util_remove);
|
||||
|
||||
|
|
|
@ -827,7 +827,7 @@ static struct platform_driver simple_card = {
|
|||
.of_match_table = simple_of_match,
|
||||
},
|
||||
.probe = simple_probe,
|
||||
.remove = simple_util_remove,
|
||||
.remove_new = simple_util_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(simple_card);
|
||||
|
|
|
@ -360,7 +360,7 @@ MODULE_DEVICE_TABLE(of, axg_card_of_match);
|
|||
|
||||
static struct platform_driver axg_card_pdrv = {
|
||||
.probe = meson_card_probe,
|
||||
.remove = meson_card_remove,
|
||||
.remove_new = meson_card_remove,
|
||||
.driver = {
|
||||
.name = "axg-sound-card",
|
||||
.of_match_table = axg_card_of_match,
|
||||
|
|
|
@ -130,7 +130,7 @@ MODULE_DEVICE_TABLE(of, gx_card_of_match);
|
|||
|
||||
static struct platform_driver gx_card_pdrv = {
|
||||
.probe = meson_card_probe,
|
||||
.remove = meson_card_remove,
|
||||
.remove_new = meson_card_remove,
|
||||
.driver = {
|
||||
.name = "gx-sound-card",
|
||||
.of_match_table = gx_card_of_match,
|
||||
|
|
|
@ -327,13 +327,11 @@ int meson_card_probe(struct platform_device *pdev)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(meson_card_probe);
|
||||
|
||||
int meson_card_remove(struct platform_device *pdev)
|
||||
void meson_card_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct meson_card *priv = platform_get_drvdata(pdev);
|
||||
|
||||
meson_card_clean_references(priv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(meson_card_remove);
|
||||
|
||||
|
|
|
@ -49,6 +49,6 @@ int meson_card_set_fe_link(struct snd_soc_card *card,
|
|||
bool is_playback);
|
||||
|
||||
int meson_card_probe(struct platform_device *pdev);
|
||||
int meson_card_remove(struct platform_device *pdev);
|
||||
void meson_card_remove(struct platform_device *pdev);
|
||||
|
||||
#endif /* _MESON_SND_CARD_H */
|
||||
|
|
|
@ -300,7 +300,7 @@ static struct platform_driver apq8016_lpass_cpu_platform_driver = {
|
|||
.of_match_table = of_match_ptr(apq8016_lpass_cpu_device_id),
|
||||
},
|
||||
.probe = asoc_qcom_lpass_cpu_platform_probe,
|
||||
.remove = asoc_qcom_lpass_cpu_platform_remove,
|
||||
.remove_new = asoc_qcom_lpass_cpu_platform_remove,
|
||||
};
|
||||
module_platform_driver(apq8016_lpass_cpu_platform_driver);
|
||||
|
||||
|
|
|
@ -1274,15 +1274,12 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(asoc_qcom_lpass_cpu_platform_probe);
|
||||
|
||||
int asoc_qcom_lpass_cpu_platform_remove(struct platform_device *pdev)
|
||||
void asoc_qcom_lpass_cpu_platform_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct lpass_data *drvdata = platform_get_drvdata(pdev);
|
||||
|
||||
if (drvdata->variant->exit)
|
||||
drvdata->variant->exit(pdev);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(asoc_qcom_lpass_cpu_platform_remove);
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ static struct platform_driver ipq806x_lpass_cpu_platform_driver = {
|
|||
.of_match_table = of_match_ptr(ipq806x_lpass_cpu_device_id),
|
||||
},
|
||||
.probe = asoc_qcom_lpass_cpu_platform_probe,
|
||||
.remove = asoc_qcom_lpass_cpu_platform_remove,
|
||||
.remove_new = asoc_qcom_lpass_cpu_platform_remove,
|
||||
};
|
||||
module_platform_driver(ipq806x_lpass_cpu_platform_driver);
|
||||
|
||||
|
|
|
@ -315,7 +315,7 @@ static struct platform_driver sc7180_lpass_cpu_platform_driver = {
|
|||
.pm = &sc7180_lpass_pm_ops,
|
||||
},
|
||||
.probe = asoc_qcom_lpass_cpu_platform_probe,
|
||||
.remove = asoc_qcom_lpass_cpu_platform_remove,
|
||||
.remove_new = asoc_qcom_lpass_cpu_platform_remove,
|
||||
.shutdown = asoc_qcom_lpass_cpu_platform_shutdown,
|
||||
};
|
||||
|
||||
|
|
|
@ -445,7 +445,7 @@ static struct platform_driver sc7280_lpass_cpu_platform_driver = {
|
|||
.pm = &sc7280_lpass_pm_ops,
|
||||
},
|
||||
.probe = asoc_qcom_lpass_cpu_platform_probe,
|
||||
.remove = asoc_qcom_lpass_cpu_platform_remove,
|
||||
.remove_new = asoc_qcom_lpass_cpu_platform_remove,
|
||||
.shutdown = asoc_qcom_lpass_cpu_platform_shutdown,
|
||||
};
|
||||
|
||||
|
|
|
@ -399,7 +399,7 @@ struct lpass_pcm_data {
|
|||
|
||||
/* register the platform driver from the CPU DAI driver */
|
||||
int asoc_qcom_lpass_platform_register(struct platform_device *);
|
||||
int asoc_qcom_lpass_cpu_platform_remove(struct platform_device *pdev);
|
||||
void asoc_qcom_lpass_cpu_platform_remove(struct platform_device *pdev);
|
||||
void asoc_qcom_lpass_cpu_platform_shutdown(struct platform_device *pdev);
|
||||
int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev);
|
||||
extern const struct snd_soc_dai_ops asoc_qcom_lpass_cpu_dai_ops;
|
||||
|
|
|
@ -1714,14 +1714,12 @@ static int rockchip_i2s_tdm_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int rockchip_i2s_tdm_remove(struct platform_device *pdev)
|
||||
static void rockchip_i2s_tdm_remove(struct platform_device *pdev)
|
||||
{
|
||||
if (!pm_runtime_status_suspended(&pdev->dev))
|
||||
i2s_tdm_runtime_suspend(&pdev->dev);
|
||||
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused rockchip_i2s_tdm_suspend(struct device *dev)
|
||||
|
@ -1756,7 +1754,7 @@ static const struct dev_pm_ops rockchip_i2s_tdm_pm_ops = {
|
|||
|
||||
static struct platform_driver rockchip_i2s_tdm_driver = {
|
||||
.probe = rockchip_i2s_tdm_probe,
|
||||
.remove = rockchip_i2s_tdm_remove,
|
||||
.remove_new = rockchip_i2s_tdm_remove,
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
.of_match_table = of_match_ptr(rockchip_i2s_tdm_match),
|
||||
|
|
|
@ -498,10 +498,9 @@ static int jh7110_pwmdac_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int jh7110_pwmdac_remove(struct platform_device *pdev)
|
||||
static void jh7110_pwmdac_remove(struct platform_device *pdev)
|
||||
{
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id jh7110_pwmdac_of_match[] = {
|
||||
|
@ -517,7 +516,7 @@ static struct platform_driver jh7110_pwmdac_driver = {
|
|||
.pm = pm_ptr(&jh7110_pwmdac_pm_ops),
|
||||
},
|
||||
.probe = jh7110_pwmdac_probe,
|
||||
.remove = jh7110_pwmdac_remove,
|
||||
.remove_new = jh7110_pwmdac_remove,
|
||||
};
|
||||
module_platform_driver(jh7110_pwmdac_driver);
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ static struct platform_driver tegra_audio_graph_card = {
|
|||
.of_match_table = graph_of_tegra_match,
|
||||
},
|
||||
.probe = tegra_audio_graph_probe,
|
||||
.remove = simple_util_remove,
|
||||
.remove_new = simple_util_remove,
|
||||
};
|
||||
module_platform_driver(tegra_audio_graph_card);
|
||||
|
||||
|
|
|
@ -822,14 +822,12 @@ int uniphier_aio_probe(struct platform_device *pdev)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(uniphier_aio_probe);
|
||||
|
||||
int uniphier_aio_remove(struct platform_device *pdev)
|
||||
void uniphier_aio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct uniphier_aio_chip *chip = platform_get_drvdata(pdev);
|
||||
|
||||
reset_control_assert(chip->rst);
|
||||
clk_disable_unprepare(chip->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(uniphier_aio_remove);
|
||||
|
||||
|
|
|
@ -347,7 +347,7 @@ static struct platform_driver uniphier_aio_driver = {
|
|||
.of_match_table = of_match_ptr(uniphier_aio_of_match),
|
||||
},
|
||||
.probe = uniphier_aio_probe,
|
||||
.remove = uniphier_aio_remove,
|
||||
.remove_new = uniphier_aio_remove,
|
||||
};
|
||||
module_platform_driver(uniphier_aio_driver);
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ static struct platform_driver uniphier_aio_driver = {
|
|||
.of_match_table = of_match_ptr(uniphier_aio_of_match),
|
||||
},
|
||||
.probe = uniphier_aio_probe,
|
||||
.remove = uniphier_aio_remove,
|
||||
.remove_new = uniphier_aio_remove,
|
||||
};
|
||||
module_platform_driver(uniphier_aio_driver);
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ int uniphier_aiodma_soc_register_platform(struct platform_device *pdev);
|
|||
extern const struct snd_compress_ops uniphier_aio_compress_ops;
|
||||
|
||||
int uniphier_aio_probe(struct platform_device *pdev);
|
||||
int uniphier_aio_remove(struct platform_device *pdev);
|
||||
void uniphier_aio_remove(struct platform_device *pdev);
|
||||
extern const struct snd_soc_dai_ops uniphier_aio_i2s_ld11_ops;
|
||||
extern const struct snd_soc_dai_ops uniphier_aio_i2s_pxs2_ops;
|
||||
extern const struct snd_soc_dai_ops uniphier_aio_spdif_ld11_ops;
|
||||
|
|
Loading…
Reference in a new issue