Commit ec380a34 authored by Mark Brown's avatar Mark Brown

ASoC: Drop empty platform remove functions

Merge series from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:

Hello,

this patch series removes all platform remove functions that only return
zero below sound/soc. There is no reason to have these, as the only
caller is platform core code doing:

        if (drv->remove) {
                int ret = drv->remove(dev);

                ...
        }

(in platform_remove()) and so having no remove function is both
equivalent and simpler.
parents 35108d6d 603d96c9
...@@ -315,16 +315,8 @@ static int acp3x_dai_probe(struct platform_device *pdev) ...@@ -315,16 +315,8 @@ static int acp3x_dai_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int acp3x_dai_remove(struct platform_device *pdev)
{
/* As we use devm_ memory alloc there is nothing TBD here */
return 0;
}
static struct platform_driver acp3x_dai_driver = { static struct platform_driver acp3x_dai_driver = {
.probe = acp3x_dai_probe, .probe = acp3x_dai_probe,
.remove = acp3x_dai_remove,
.driver = { .driver = {
.name = "acp3x_i2s_playcap", .name = "acp3x_i2s_playcap",
}, },
......
...@@ -616,11 +616,6 @@ static int atmel_classd_probe(struct platform_device *pdev) ...@@ -616,11 +616,6 @@ static int atmel_classd_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int atmel_classd_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver atmel_classd_driver = { static struct platform_driver atmel_classd_driver = {
.driver = { .driver = {
.name = "atmel-classd", .name = "atmel-classd",
...@@ -628,7 +623,6 @@ static struct platform_driver atmel_classd_driver = { ...@@ -628,7 +623,6 @@ static struct platform_driver atmel_classd_driver = {
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
}, },
.probe = atmel_classd_probe, .probe = atmel_classd_probe,
.remove = atmel_classd_remove,
}; };
module_platform_driver(atmel_classd_driver); module_platform_driver(atmel_classd_driver);
......
...@@ -692,11 +692,6 @@ static int atmel_pdmic_probe(struct platform_device *pdev) ...@@ -692,11 +692,6 @@ static int atmel_pdmic_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int atmel_pdmic_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver atmel_pdmic_driver = { static struct platform_driver atmel_pdmic_driver = {
.driver = { .driver = {
.name = "atmel-pdmic", .name = "atmel-pdmic",
...@@ -704,7 +699,6 @@ static struct platform_driver atmel_pdmic_driver = { ...@@ -704,7 +699,6 @@ static struct platform_driver atmel_pdmic_driver = {
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
}, },
.probe = atmel_pdmic_probe, .probe = atmel_pdmic_probe,
.remove = atmel_pdmic_remove,
}; };
module_platform_driver(atmel_pdmic_driver); module_platform_driver(atmel_pdmic_driver);
......
...@@ -1386,17 +1386,11 @@ static int pm860x_codec_probe(struct platform_device *pdev) ...@@ -1386,17 +1386,11 @@ static int pm860x_codec_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int pm860x_codec_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver pm860x_codec_driver = { static struct platform_driver pm860x_codec_driver = {
.driver = { .driver = {
.name = "88pm860x-codec", .name = "88pm860x-codec",
}, },
.probe = pm860x_codec_probe, .probe = pm860x_codec_probe,
.remove = pm860x_codec_remove,
}; };
module_platform_driver(pm860x_codec_driver); module_platform_driver(pm860x_codec_driver);
......
...@@ -127,18 +127,12 @@ static int ac97_probe(struct platform_device *pdev) ...@@ -127,18 +127,12 @@ static int ac97_probe(struct platform_device *pdev)
&soc_component_dev_ac97, &ac97_dai, 1); &soc_component_dev_ac97, &ac97_dai, 1);
} }
static int ac97_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver ac97_codec_driver = { static struct platform_driver ac97_codec_driver = {
.driver = { .driver = {
.name = "ac97-codec", .name = "ac97-codec",
}, },
.probe = ac97_probe, .probe = ac97_probe,
.remove = ac97_remove,
}; };
module_platform_driver(ac97_codec_driver); module_platform_driver(ac97_codec_driver);
......
...@@ -100,11 +100,6 @@ static int adau7002_probe(struct platform_device *pdev) ...@@ -100,11 +100,6 @@ static int adau7002_probe(struct platform_device *pdev)
&adau7002_dai, 1); &adau7002_dai, 1);
} }
static int adau7002_remove(struct platform_device *pdev)
{
return 0;
}
#ifdef CONFIG_OF #ifdef CONFIG_OF
static const struct of_device_id adau7002_dt_ids[] = { static const struct of_device_id adau7002_dt_ids[] = {
{ .compatible = "adi,adau7002", }, { .compatible = "adi,adau7002", },
...@@ -128,7 +123,6 @@ static struct platform_driver adau7002_driver = { ...@@ -128,7 +123,6 @@ static struct platform_driver adau7002_driver = {
.acpi_match_table = ACPI_PTR(adau7002_acpi_match), .acpi_match_table = ACPI_PTR(adau7002_acpi_match),
}, },
.probe = adau7002_probe, .probe = adau7002_probe,
.remove = adau7002_remove,
}; };
module_platform_driver(adau7002_driver); module_platform_driver(adau7002_driver);
......
...@@ -78,11 +78,6 @@ static int bt_sco_probe(struct platform_device *pdev) ...@@ -78,11 +78,6 @@ static int bt_sco_probe(struct platform_device *pdev)
bt_sco_dai, ARRAY_SIZE(bt_sco_dai)); bt_sco_dai, ARRAY_SIZE(bt_sco_dai));
} }
static int bt_sco_remove(struct platform_device *pdev)
{
return 0;
}
static const struct platform_device_id bt_sco_driver_ids[] = { static const struct platform_device_id bt_sco_driver_ids[] = {
{ {
.name = "dfbmcs320", .name = "dfbmcs320",
...@@ -109,7 +104,6 @@ static struct platform_driver bt_sco_driver = { ...@@ -109,7 +104,6 @@ static struct platform_driver bt_sco_driver = {
.of_match_table = of_match_ptr(bt_sco_codec_of_match), .of_match_table = of_match_ptr(bt_sco_codec_of_match),
}, },
.probe = bt_sco_probe, .probe = bt_sco_probe,
.remove = bt_sco_remove,
.id_table = bt_sco_driver_ids, .id_table = bt_sco_driver_ids,
}; };
......
...@@ -134,18 +134,12 @@ static int cq93vc_platform_probe(struct platform_device *pdev) ...@@ -134,18 +134,12 @@ static int cq93vc_platform_probe(struct platform_device *pdev)
&soc_component_dev_cq93vc, &cq93vc_dai, 1); &soc_component_dev_cq93vc, &cq93vc_dai, 1);
} }
static int cq93vc_platform_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver cq93vc_codec_driver = { static struct platform_driver cq93vc_codec_driver = {
.driver = { .driver = {
.name = "cq93vc-codec", .name = "cq93vc-codec",
}, },
.probe = cq93vc_platform_probe, .probe = cq93vc_platform_probe,
.remove = cq93vc_platform_remove,
}; };
module_platform_driver(cq93vc_codec_driver); module_platform_driver(cq93vc_codec_driver);
......
...@@ -776,16 +776,10 @@ static int __init mc13783_codec_probe(struct platform_device *pdev) ...@@ -776,16 +776,10 @@ static int __init mc13783_codec_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int mc13783_codec_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver mc13783_codec_driver = { static struct platform_driver mc13783_codec_driver = {
.driver = { .driver = {
.name = "mc13783-codec", .name = "mc13783-codec",
}, },
.remove = mc13783_codec_remove,
}; };
module_platform_driver_probe(mc13783_codec_driver, mc13783_codec_probe); module_platform_driver_probe(mc13783_codec_driver, mc13783_codec_probe);
......
...@@ -484,11 +484,6 @@ static int wl1273_platform_probe(struct platform_device *pdev) ...@@ -484,11 +484,6 @@ static int wl1273_platform_probe(struct platform_device *pdev)
&wl1273_dai, 1); &wl1273_dai, 1);
} }
static int wl1273_platform_remove(struct platform_device *pdev)
{
return 0;
}
MODULE_ALIAS("platform:wl1273-codec"); MODULE_ALIAS("platform:wl1273-codec");
static struct platform_driver wl1273_platform_driver = { static struct platform_driver wl1273_platform_driver = {
...@@ -496,7 +491,6 @@ static struct platform_driver wl1273_platform_driver = { ...@@ -496,7 +491,6 @@ static struct platform_driver wl1273_platform_driver = {
.name = "wl1273-codec", .name = "wl1273-codec",
}, },
.probe = wl1273_platform_probe, .probe = wl1273_platform_probe,
.remove = wl1273_platform_remove,
}; };
module_platform_driver(wl1273_platform_driver); module_platform_driver(wl1273_platform_driver);
......
...@@ -145,18 +145,12 @@ static int e740_probe(struct platform_device *pdev) ...@@ -145,18 +145,12 @@ static int e740_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int e740_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver e740_driver = { static struct platform_driver e740_driver = {
.driver = { .driver = {
.name = "e740-audio", .name = "e740-audio",
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
}, },
.probe = e740_probe, .probe = e740_probe,
.remove = e740_remove,
}; };
module_platform_driver(e740_driver); module_platform_driver(e740_driver);
......
...@@ -124,18 +124,12 @@ static int e750_probe(struct platform_device *pdev) ...@@ -124,18 +124,12 @@ static int e750_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int e750_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver e750_driver = { static struct platform_driver e750_driver = {
.driver = { .driver = {
.name = "e750-audio", .name = "e750-audio",
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
}, },
.probe = e750_probe, .probe = e750_probe,
.remove = e750_remove,
}; };
module_platform_driver(e750_driver); module_platform_driver(e750_driver);
......
...@@ -124,18 +124,12 @@ static int e800_probe(struct platform_device *pdev) ...@@ -124,18 +124,12 @@ static int e800_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int e800_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver e800_driver = { static struct platform_driver e800_driver = {
.driver = { .driver = {
.name = "e800-audio", .name = "e800-audio",
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
}, },
.probe = e800_probe, .probe = e800_probe,
.remove = e800_remove,
}; };
module_platform_driver(e800_driver); module_platform_driver(e800_driver);
......
...@@ -103,14 +103,8 @@ static int sof_nocodec_probe(struct platform_device *pdev) ...@@ -103,14 +103,8 @@ static int sof_nocodec_probe(struct platform_device *pdev)
return devm_snd_soc_register_card(&pdev->dev, card); return devm_snd_soc_register_card(&pdev->dev, card);
} }
static int sof_nocodec_remove(struct platform_device *pdev)
{
return 0;
}
static struct platform_driver sof_nocodec_audio = { static struct platform_driver sof_nocodec_audio = {
.probe = sof_nocodec_probe, .probe = sof_nocodec_probe,
.remove = sof_nocodec_remove,
.driver = { .driver = {
.name = "sof-nocodec", .name = "sof-nocodec",
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment