Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Vinod Koul
ffcfc20f c7266d26

+20 -7
+4 -5
drivers/dma/idma64.c
··· 19 19 #include <linux/platform_device.h> 20 20 #include <linux/slab.h> 21 21 22 - #include "idma64.h" 22 + #include <linux/dma/idma64.h> 23 23 24 - /* Platform driver name */ 25 - #define DRV_NAME "idma64" 24 + #include "idma64.h" 26 25 27 26 /* For now we support only two channels */ 28 27 #define IDMA64_NR_CHAN 2 ··· 698 699 .probe = idma64_platform_probe, 699 700 .remove = idma64_platform_remove, 700 701 .driver = { 701 - .name = DRV_NAME, 702 + .name = LPSS_IDMA64_DRIVER_NAME, 702 703 .pm = &idma64_dev_pm_ops, 703 704 }, 704 705 }; ··· 708 709 MODULE_LICENSE("GPL v2"); 709 710 MODULE_DESCRIPTION("iDMA64 core driver"); 710 711 MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); 711 - MODULE_ALIAS("platform:" DRV_NAME); 712 + MODULE_ALIAS("platform:" LPSS_IDMA64_DRIVER_NAME);
+2 -2
drivers/mfd/intel-lpss.c
··· 28 28 #include <linux/seq_file.h> 29 29 #include <linux/io-64-nonatomic-lo-hi.h> 30 30 31 + #include <linux/dma/idma64.h> 32 + 31 33 #include "intel-lpss.h" 32 34 33 35 #define LPSS_DEV_OFFSET 0x000 ··· 97 95 DEFINE_RES_MEM(LPSS_IDMA64_OFFSET, LPSS_IDMA64_SIZE), 98 96 DEFINE_RES_IRQ(0), 99 97 }; 100 - 101 - #define LPSS_IDMA64_DRIVER_NAME "idma64" 102 98 103 99 /* 104 100 * Cells needs to be ordered so that the iDMA is created first. This is
+14
include/linux/dma/idma64.h
··· 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__ */