hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/dma/idma64.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Core driver for the Intel integrated DMA 64-bit
34 *
45 * Copyright (C) 2015 Intel Corporation
56 * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.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
129 #include <linux/bitops.h>
....@@ -19,10 +16,9 @@
1916 #include <linux/platform_device.h>
2017 #include <linux/slab.h>
2118
22
-#include "idma64.h"
19
+#include <linux/dma/idma64.h>
2320
24
-/* Platform driver name */
25
-#define DRV_NAME "idma64"
21
+#include "idma64.h"
2622
2723 /* For now we support only two channels */
2824 #define IDMA64_NR_CHAN 2
....@@ -142,9 +138,8 @@
142138 {
143139 struct idma64_chan *idma64c = &idma64->chan[c];
144140 struct idma64_desc *desc;
145
- unsigned long flags;
146141
147
- spin_lock_irqsave(&idma64c->vchan.lock, flags);
142
+ spin_lock(&idma64c->vchan.lock);
148143 desc = idma64c->desc;
149144 if (desc) {
150145 if (status_err & (1 << c)) {
....@@ -161,7 +156,7 @@
161156 if (idma64c->desc == NULL || desc->status == DMA_ERROR)
162157 idma64_stop_transfer(idma64c);
163158 }
164
- spin_unlock_irqrestore(&idma64c->vchan.lock, flags);
159
+ spin_unlock(&idma64c->vchan.lock);
165160 }
166161
167162 static irqreturn_t idma64_irq(int irq, void *dev)
....@@ -407,10 +402,6 @@
407402 struct dma_slave_config *config)
408403 {
409404 struct idma64_chan *idma64c = to_idma64_chan(chan);
410
-
411
- /* Check if chan will be configured for slave transfers */
412
- if (!is_slave_direction(config->direction))
413
- return -EINVAL;
414405
415406 memcpy(&idma64c->config, config, sizeof(idma64c->config));
416407
....@@ -704,7 +695,7 @@
704695 .probe = idma64_platform_probe,
705696 .remove = idma64_platform_remove,
706697 .driver = {
707
- .name = DRV_NAME,
698
+ .name = LPSS_IDMA64_DRIVER_NAME,
708699 .pm = &idma64_dev_pm_ops,
709700 },
710701 };
....@@ -714,4 +705,4 @@
714705 MODULE_LICENSE("GPL v2");
715706 MODULE_DESCRIPTION("iDMA64 core driver");
716707 MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
717
-MODULE_ALIAS("platform:" DRV_NAME);
708
+MODULE_ALIAS("platform:" LPSS_IDMA64_DRIVER_NAME);