.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Au12x0/Au1550 PSC ALSA ASoC audio support. |
---|
3 | 4 | * |
---|
4 | 5 | * (c) 2007-2008 MSC Vertriebsges.m.b.H., |
---|
5 | 6 | * Manuel Lauss <manuel.lauss@gmail.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License version 2 as |
---|
9 | | - * published by the Free Software Foundation. |
---|
10 | 7 | * |
---|
11 | 8 | * Au1xxx-PSC I2S glue. |
---|
12 | 9 | * |
---|
.. | .. |
---|
294 | 291 | |
---|
295 | 292 | static int au1xpsc_i2s_drvprobe(struct platform_device *pdev) |
---|
296 | 293 | { |
---|
297 | | - struct resource *iores, *dmares; |
---|
| 294 | + struct resource *dmares; |
---|
298 | 295 | unsigned long sel; |
---|
299 | 296 | struct au1xpsc_audio_data *wd; |
---|
300 | 297 | |
---|
.. | .. |
---|
303 | 300 | if (!wd) |
---|
304 | 301 | return -ENOMEM; |
---|
305 | 302 | |
---|
306 | | - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
307 | | - wd->mmio = devm_ioremap_resource(&pdev->dev, iores); |
---|
| 303 | + wd->mmio = devm_platform_ioremap_resource(pdev, 0); |
---|
308 | 304 | if (IS_ERR(wd->mmio)) |
---|
309 | 305 | return PTR_ERR(wd->mmio); |
---|
310 | 306 | |
---|
.. | .. |
---|
343 | 339 | |
---|
344 | 340 | platform_set_drvdata(pdev, wd); |
---|
345 | 341 | |
---|
346 | | - return snd_soc_register_component(&pdev->dev, &au1xpsc_i2s_component, |
---|
347 | | - &wd->dai_drv, 1); |
---|
| 342 | + return devm_snd_soc_register_component(&pdev->dev, |
---|
| 343 | + &au1xpsc_i2s_component, &wd->dai_drv, 1); |
---|
348 | 344 | } |
---|
349 | 345 | |
---|
350 | 346 | static int au1xpsc_i2s_drvremove(struct platform_device *pdev) |
---|
351 | 347 | { |
---|
352 | 348 | struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev); |
---|
353 | | - |
---|
354 | | - snd_soc_unregister_component(&pdev->dev); |
---|
355 | 349 | |
---|
356 | 350 | __raw_writel(0, I2S_CFG(wd)); |
---|
357 | 351 | wmb(); /* drain writebuffer */ |
---|