summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorMatthias Brugger <matthias.bgg@gmail.com>2023-01-11 15:45:24 +0800
committerMatthias Brugger <matthias.bgg@gmail.com>2023-01-31 14:24:58 +0100
commit5343e9ffb4337c22b9aef41161bc92ee5b449a17 (patch)
tree18ec4d313eeea990c07a4486eda0bfa4a63cd992 /drivers/soc
parent227fafd73b1c1f67114da6322fc32cb545b3a20b (diff)
downloadlinux-stable-5343e9ffb4337c22b9aef41161bc92ee5b449a17.tar.gz
linux-stable-5343e9ffb4337c22b9aef41161bc92ee5b449a17.tar.bz2
linux-stable-5343e9ffb4337c22b9aef41161bc92ee5b449a17.zip
soc: mediatek: mtk-svs: move svs_platform_probe into probe
Moving svs_platform_probe into driver probe function will allow us to reduce svs_platform members. This will be done in a follow-up patch. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Roger Lu <roger.lu@mediatek.com> Link: https://lore.kernel.org/r/20230111074528.29354-11-roger.lu@mediatek.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/mediatek/mtk-svs.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index 937a4163bff1..5c5a30fbebd1 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -2353,17 +2353,17 @@ static const struct of_device_id svs_of_match[] = {
},
};
-static struct svs_platform *svs_platform_probe(struct platform_device *pdev)
+static int svs_probe(struct platform_device *pdev)
{
struct svs_platform *svsp;
const struct svs_platform_data *svsp_data;
- int ret;
+ int ret, svsp_irq;
svsp_data = of_device_get_match_data(&pdev->dev);
svsp = devm_kzalloc(&pdev->dev, sizeof(*svsp), GFP_KERNEL);
if (!svsp)
- return ERR_PTR(-ENOMEM);
+ return -ENOMEM;
svsp->dev = &pdev->dev;
svsp->name = svsp_data->name;
@@ -2374,19 +2374,7 @@ static struct svs_platform *svs_platform_probe(struct platform_device *pdev)
ret = svsp_data->probe(svsp);
if (ret)
- return ERR_PTR(ret);
-
- return svsp;
-}
-
-static int svs_probe(struct platform_device *pdev)
-{
- struct svs_platform *svsp;
- int svsp_irq, ret;
-
- svsp = svs_platform_probe(pdev);
- if (IS_ERR(svsp))
- return PTR_ERR(svsp);
+ return ret;
if (!svs_is_efuse_data_correct(svsp)) {
dev_notice(svsp->dev, "efuse data isn't correct\n");