hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/dma/zx_dma.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright 2015 Linaro.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 */
85 #include <linux/sched.h>
96 #include <linux/device.h>
....@@ -288,9 +285,7 @@
288285 p = &d->phy[i];
289286 c = p->vchan;
290287 if (c) {
291
- unsigned long flags;
292
-
293
- spin_lock_irqsave(&c->vc.lock, flags);
288
+ spin_lock(&c->vc.lock);
294289 if (c->cyclic) {
295290 vchan_cyclic_callback(&p->ds_run->vd);
296291 } else {
....@@ -298,7 +293,7 @@
298293 p->ds_done = p->ds_run;
299294 task = 1;
300295 }
301
- spin_unlock_irqrestore(&c->vc.lock, flags);
296
+ spin_unlock(&c->vc.lock);
302297 irq_chan |= BIT(i);
303298 }
304299 }
....@@ -757,18 +752,13 @@
757752 static int zx_dma_probe(struct platform_device *op)
758753 {
759754 struct zx_dma_dev *d;
760
- struct resource *iores;
761755 int i, ret = 0;
762
-
763
- iores = platform_get_resource(op, IORESOURCE_MEM, 0);
764
- if (!iores)
765
- return -EINVAL;
766756
767757 d = devm_kzalloc(&op->dev, sizeof(*d), GFP_KERNEL);
768758 if (!d)
769759 return -ENOMEM;
770760
771
- d->base = devm_ioremap_resource(&op->dev, iores);
761
+ d->base = devm_platform_ioremap_resource(op, 0);
772762 if (IS_ERR(d->base))
773763 return PTR_ERR(d->base);
774764
....@@ -897,7 +887,6 @@
897887 list_del(&c->vc.chan.device_node);
898888 }
899889 clk_disable_unprepare(d->clk);
900
- dmam_pool_destroy(d->pool);
901890
902891 return 0;
903892 }