forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/kirkwood/kirkwood-i2s.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * kirkwood-i2s.c
34 *
45 * (c) 2010 Arnaud Patard <apatard@mandriva.com>
56 * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org>
6
- *
7
- * This program is free software; you can redistribute it and/or modify it
8
- * under the terms of the GNU General Public License as published by the
9
- * Free Software Foundation; either version 2 of the License, or (at your
10
- * option) any later version.
117 */
128
139 #include <linux/init.h>
....@@ -527,7 +523,6 @@
527523 struct kirkwood_asoc_platform_data *data = pdev->dev.platform_data;
528524 struct snd_soc_dai_driver *soc_dai = kirkwood_i2s_dai;
529525 struct kirkwood_dma_data *priv;
530
- struct resource *mem;
531526 struct device_node *np = pdev->dev.of_node;
532527 int err;
533528
....@@ -537,16 +532,13 @@
537532
538533 dev_set_drvdata(&pdev->dev, priv);
539534
540
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
541
- priv->io = devm_ioremap_resource(&pdev->dev, mem);
535
+ priv->io = devm_platform_ioremap_resource(pdev, 0);
542536 if (IS_ERR(priv->io))
543537 return PTR_ERR(priv->io);
544538
545539 priv->irq = platform_get_irq(pdev, 0);
546
- if (priv->irq < 0) {
547
- dev_err(&pdev->dev, "platform_get_irq failed: %d\n", priv->irq);
540
+ if (priv->irq < 0)
548541 return priv->irq;
549
- }
550542
551543 if (np) {
552544 priv->burst = 128; /* might be 32 or 128 */