History

dmaengine: idma64: Move driver name to the header

There are two drivers that are relying on the iDMA 64-bit driver name to match. Instead of duplicating string in both of them, dedicate a header file and share it between users.

Andy Shevchenko committed 7 years ago

Commit ffcfc201 parent c7266d23 files · +20 −7Browse files

Unified · Split

3 files
  1. drivers/dma/idma64.c +4 −5
  2. drivers/mfd/intel-lpss.c +2 −2
  3. include/linux/dma/idma64.h +14 −0
drivers/dma/idma64.c+4−5
@@ -19,10 +19,9 @@ · 18 unmodified lines
1919 #include <linux/platform_device.h>
2020 #include <linux/slab.h>
2121
22−#include "idma64.h"
22+#include <linux/dma/idma64.h>
2323
24−/* Platform driver name */
25−#define DRV_NAME "idma64"
24+#include "idma64.h"
2625
2726 /* For now we support only two channels */
2827 #define IDMA64_NR_CHAN 2
@@ -699,7 +698,7 @@ static struct platform_driver idma64_platform_driver = { · 670 unmodified lines
699698 .probe = idma64_platform_probe,
700699 .remove = idma64_platform_remove,
701700 .driver = {
702− .name = DRV_NAME,
701+ .name = LPSS_IDMA64_DRIVER_NAME,
703702 .pm = &idma64_dev_pm_ops,
704703 },
705704 };
@@ -709,4 +708,4 @@ module_platform_driver(idma64_platform_driver); · 3 unmodified lines
709708 MODULE_LICENSE("GPL v2");
710709 MODULE_DESCRIPTION("iDMA64 core driver");
711710 MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
712−MODULE_ALIAS("platform:" DRV_NAME);
711+MODULE_ALIAS("platform:" LPSS_IDMA64_DRIVER_NAME);
drivers/mfd/intel-lpss.c+2−2
@@ -28,6 +28,8 @@ · 27 unmodified lines
2828 #include <linux/seq_file.h>
2929 #include <linux/io-64-nonatomic-lo-hi.h>
3030
31+#include <linux/dma/idma64.h>
32+
3133 #include "intel-lpss.h"
3234
3335 #define LPSS_DEV_OFFSET 0x000
@@ -96,8 +98,6 @@ static const struct resource intel_lpss_idma64_resources[] = { · 62 unmodified lines
9698 DEFINE_RES_IRQ(0),
9799 };
98100
99−#define LPSS_IDMA64_DRIVER_NAME "idma64"
100−
101101 /*
102102 * Cells needs to be ordered so that the iDMA is created first. This is
103103 * because we need to be sure the DMA is available when the host controller
include/linux/dma/idma64.h+14−0
@@ -0,0 +1,14 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+/*
3+ * Definitions for the Intel integrated DMA 64-bit
4+ *
5+ * Copyright (C) 2019 Intel Corporation
6+ */
7+
8+#ifndef __LINUX_DMA_IDMA64_H__
9+#define __LINUX_DMA_IDMA64_H__
10+
11+/* Platform driver name */
12+#define LPSS_IDMA64_DRIVER_NAME "idma64"
13+
14+#endif /* __LINUX_DMA_IDMA64_H__ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t