| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 7 | 4 | */ |
|---|
| 8 | 5 | #include <linux/sched.h> |
|---|
| 9 | 6 | #include <linux/device.h> |
|---|
| .. | .. |
|---|
| 288 | 285 | p = &d->phy[i]; |
|---|
| 289 | 286 | c = p->vchan; |
|---|
| 290 | 287 | if (c) { |
|---|
| 291 | | - unsigned long flags; |
|---|
| 292 | | - |
|---|
| 293 | | - spin_lock_irqsave(&c->vc.lock, flags); |
|---|
| 288 | + spin_lock(&c->vc.lock); |
|---|
| 294 | 289 | if (c->cyclic) { |
|---|
| 295 | 290 | vchan_cyclic_callback(&p->ds_run->vd); |
|---|
| 296 | 291 | } else { |
|---|
| .. | .. |
|---|
| 298 | 293 | p->ds_done = p->ds_run; |
|---|
| 299 | 294 | task = 1; |
|---|
| 300 | 295 | } |
|---|
| 301 | | - spin_unlock_irqrestore(&c->vc.lock, flags); |
|---|
| 296 | + spin_unlock(&c->vc.lock); |
|---|
| 302 | 297 | irq_chan |= BIT(i); |
|---|
| 303 | 298 | } |
|---|
| 304 | 299 | } |
|---|
| .. | .. |
|---|
| 757 | 752 | static int zx_dma_probe(struct platform_device *op) |
|---|
| 758 | 753 | { |
|---|
| 759 | 754 | struct zx_dma_dev *d; |
|---|
| 760 | | - struct resource *iores; |
|---|
| 761 | 755 | int i, ret = 0; |
|---|
| 762 | | - |
|---|
| 763 | | - iores = platform_get_resource(op, IORESOURCE_MEM, 0); |
|---|
| 764 | | - if (!iores) |
|---|
| 765 | | - return -EINVAL; |
|---|
| 766 | 756 | |
|---|
| 767 | 757 | d = devm_kzalloc(&op->dev, sizeof(*d), GFP_KERNEL); |
|---|
| 768 | 758 | if (!d) |
|---|
| 769 | 759 | return -ENOMEM; |
|---|
| 770 | 760 | |
|---|
| 771 | | - d->base = devm_ioremap_resource(&op->dev, iores); |
|---|
| 761 | + d->base = devm_platform_ioremap_resource(op, 0); |
|---|
| 772 | 762 | if (IS_ERR(d->base)) |
|---|
| 773 | 763 | return PTR_ERR(d->base); |
|---|
| 774 | 764 | |
|---|
| .. | .. |
|---|
| 897 | 887 | list_del(&c->vc.chan.device_node); |
|---|
| 898 | 888 | } |
|---|
| 899 | 889 | clk_disable_unprepare(d->clk); |
|---|
| 900 | | - dmam_pool_destroy(d->pool); |
|---|
| 901 | 890 | |
|---|
| 902 | 891 | return 0; |
|---|
| 903 | 892 | } |
|---|