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.
Unified · Split
| @@ -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 2 | 27 | #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 | |||
| 709 | MODULE_LICENSE("GPL v2"); | 708 | MODULE_LICENSE("GPL v2"); |
| 710 | MODULE_DESCRIPTION("iDMA64 core driver"); | 709 | MODULE_DESCRIPTION("iDMA64 core driver"); |
| 711 | MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); | 710 | MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); |
| 712 | MODULE_ALIAS("platform:" DRV_NAME); | 711 | MODULE_ALIAS("platform:" LPSS_IDMA64_DRIVER_NAME); |
| @@ -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 0x000 | 35 | #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 is | 102 | * 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 controller | 103 | * because we need to be sure the DMA is available when the host controller |
| @@ -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__ */ | ||