hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/sound/soc/au1x/psc-i2s.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Au12x0/Au1550 PSC ALSA ASoC audio support.
34 *
45 * (c) 2007-2008 MSC Vertriebsges.m.b.H.,
56 * 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.
107 *
118 * Au1xxx-PSC I2S glue.
129 *
....@@ -294,7 +291,7 @@
294291
295292 static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
296293 {
297
- struct resource *iores, *dmares;
294
+ struct resource *dmares;
298295 unsigned long sel;
299296 struct au1xpsc_audio_data *wd;
300297
....@@ -303,8 +300,7 @@
303300 if (!wd)
304301 return -ENOMEM;
305302
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);
308304 if (IS_ERR(wd->mmio))
309305 return PTR_ERR(wd->mmio);
310306
....@@ -343,15 +339,13 @@
343339
344340 platform_set_drvdata(pdev, wd);
345341
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);
348344 }
349345
350346 static int au1xpsc_i2s_drvremove(struct platform_device *pdev)
351347 {
352348 struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
353
-
354
- snd_soc_unregister_component(&pdev->dev);
355349
356350 __raw_writel(0, I2S_CFG(wd));
357351 wmb(); /* drain writebuffer */