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
19#include <linux/platform_device.h>19#include <linux/platform_device.h>
20#include <linux/slab.h>20#include <linux/slab.h>
21 21
22#include "idma64.h"22#include <linux/dma/idma64.h>
23 23
24/* Platform driver name */24#include "idma64.h"
25#define DRV_NAME "idma64"
26 25
27/* For now we support only two channels */26/* For now we support only two channels */
28#define IDMA64_NR_CHAN 227#define IDMA64_NR_CHAN 2
@@ -699,7 +698,7 @@ static struct platform_driver idma64_platform_driver = { · 670 unmodified lines
699 .probe = idma64_platform_probe,698 .probe = idma64_platform_probe,
700 .remove = idma64_platform_remove,699 .remove = idma64_platform_remove,
701 .driver = {700 .driver = {
702 .name = DRV_NAME,701 .name = LPSS_IDMA64_DRIVER_NAME,
703 .pm = &idma64_dev_pm_ops,702 .pm = &idma64_dev_pm_ops,
704 },703 },
705};704};
@@ -709,4 +708,4 @@ module_platform_driver(idma64_platform_driver); · 3 unmodified lines
709MODULE_LICENSE("GPL v2");708MODULE_LICENSE("GPL v2");
710MODULE_DESCRIPTION("iDMA64 core driver");709MODULE_DESCRIPTION("iDMA64 core driver");
711MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");710MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
712MODULE_ALIAS("platform:" DRV_NAME);711MODULE_ALIAS("platform:" LPSS_IDMA64_DRIVER_NAME);
drivers/mfd/intel-lpss.c+2−2
@@ -28,6 +28,8 @@ · 27 unmodified lines
28#include <linux/seq_file.h>28#include <linux/seq_file.h>
29#include <linux/io-64-nonatomic-lo-hi.h>29#include <linux/io-64-nonatomic-lo-hi.h>
30 30
31#include <linux/dma/idma64.h>
32
31#include "intel-lpss.h"33#include "intel-lpss.h"
32 34
33#define LPSS_DEV_OFFSET 0x00035#define LPSS_DEV_OFFSET 0x000
@@ -96,8 +98,6 @@ static const struct resource intel_lpss_idma64_resources[] = { · 62 unmodified lines
96 DEFINE_RES_IRQ(0),98 DEFINE_RES_IRQ(0),
97};99};
98 100
99#define LPSS_IDMA64_DRIVER_NAME "idma64"
100
101/*101/*
102 * Cells needs to be ordered so that the iDMA is created first. This is102 * Cells needs to be ordered so that the iDMA is created first. This is
103 * because we need to be sure the DMA is available when the host controller103 * 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