mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
ASoC: pxa2xx-ac97: Remove platform_data
Since commit d6df7df7ae ("ARM: pxa: remove unused board files"), there
has been no in-tree user to create the device with platform data. So remove
them.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Link: https://patch.msgid.link/20260122-sound-cleanup-v1-3-0a91901609b8@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b094de7810
commit
be829277ef
2 changed files with 7 additions and 31 deletions
|
|
@ -321,7 +321,6 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
|
|||
{
|
||||
int ret;
|
||||
int irq;
|
||||
pxa2xx_audio_ops_t *pdata = dev->dev.platform_data;
|
||||
|
||||
ac97_reg_base = devm_platform_ioremap_resource(dev, 0);
|
||||
if (IS_ERR(ac97_reg_base)) {
|
||||
|
|
@ -329,32 +328,12 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
|
|||
return PTR_ERR(ac97_reg_base);
|
||||
}
|
||||
|
||||
if (pdata) {
|
||||
switch (pdata->reset_gpio) {
|
||||
case 95:
|
||||
case 113:
|
||||
reset_gpio = pdata->reset_gpio;
|
||||
break;
|
||||
case 0:
|
||||
reset_gpio = 113;
|
||||
break;
|
||||
case -1:
|
||||
break;
|
||||
default:
|
||||
dev_err(&dev->dev, "Invalid reset GPIO %d\n",
|
||||
pdata->reset_gpio);
|
||||
}
|
||||
} else if (!pdata && dev->dev.of_node) {
|
||||
pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), GFP_KERNEL);
|
||||
if (!pdata)
|
||||
return -ENOMEM;
|
||||
pdata->reset_gpio = of_get_named_gpio(dev->dev.of_node,
|
||||
"reset-gpios", 0);
|
||||
if (pdata->reset_gpio == -ENOENT)
|
||||
pdata->reset_gpio = -1;
|
||||
else if (pdata->reset_gpio < 0)
|
||||
return pdata->reset_gpio;
|
||||
reset_gpio = pdata->reset_gpio;
|
||||
if (dev->dev.of_node) {
|
||||
reset_gpio = of_get_named_gpio(dev->dev.of_node, "reset-gpios", 0);
|
||||
if (reset_gpio == -ENOENT)
|
||||
reset_gpio = -1;
|
||||
else if (reset_gpio < 0)
|
||||
return reset_gpio;
|
||||
} else {
|
||||
if (cpu_is_pxa27x())
|
||||
reset_gpio = 113;
|
||||
|
|
|
|||
|
|
@ -222,9 +222,7 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
|
|||
{
|
||||
int ret;
|
||||
struct ac97_controller *ctrl;
|
||||
pxa2xx_audio_ops_t *pdata = pdev->dev.platform_data;
|
||||
struct resource *regs;
|
||||
void **codecs_pdata;
|
||||
|
||||
if (pdev->id != -1) {
|
||||
dev_err(&pdev->dev, "PXA2xx has only one AC97 port.\n");
|
||||
|
|
@ -247,10 +245,9 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
codecs_pdata = pdata ? pdata->codec_pdata : NULL;
|
||||
ctrl = snd_ac97_controller_register(&pxa2xx_ac97_ops, &pdev->dev,
|
||||
AC97_SLOTS_AVAILABLE_ALL,
|
||||
codecs_pdata);
|
||||
NULL);
|
||||
if (IS_ERR(ctrl))
|
||||
return PTR_ERR(ctrl);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue