Skip to content

Commit ffcfc20

Browse files
andy-shevvinodkoul
authored andcommitted
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. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent c7266d2 commit ffcfc20

3 files changed

Lines changed: 20 additions & 7 deletions

File tree

‎drivers/dma/idma64.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
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 = {
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);
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‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
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[] = {
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‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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__ */

0 commit comments

Comments
 (0)