Skip to contentSkip to conversation

staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c

PATCH In review Ilya Lipnitskiy 3 participants 4 messages Jan 30, 2021 – Feb 2, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c

Also use KBUILD_MODNAME for module name.

This driver is only used by RALINK MIPS MT7621 SoCs. Tested by building against that target using OpenWrt with Linux 5.10.10.

Fixes the following error:
error: the following would cause module name conflict:
drivers/dma/mediatek/mtk-hsdma.ko drivers/staging/mt7621-dma/mtk-hsdma.ko

---
 drivers/staging/mt7621-dma/Makefile                        | 2 +-
 drivers/staging/mt7621-dma/{mtk-hsdma.c => hsdma-mt7621.c} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename drivers/staging/mt7621-dma/{mtk-hsdma.c => hsdma-mt7621.c} (99%)
drivers/staging/mt7621-dma/Makefile +1 -1
index 66da1bf10c32..23256d1286f3 100644
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_MTK_HSDMA) += mtk-hsdma.o
+obj-$(CONFIG_MTK_HSDMA) += hsdma-mt7621.o
 
 ccflags-y += -I$(srctree)/drivers/dma
drivers/staging/mt7621-dma/hsdma-mt7621.c renamed from drivers/staging/mt7621-dma/mtk-hsdma.c +1 -1
similarity index 99%
rename from drivers/staging/mt7621-dma/mtk-hsdma.c
rename to drivers/staging/mt7621-dma/hsdma-mt7621.c
index bc4bb4374313..b0ed935de7ac 100644
@@ -749,7 +749,7 @@ static struct platform_driver mtk_hsdma_driver = {
 	.probe = mtk_hsdma_probe,
 	.remove = mtk_hsdma_remove,
 	.driver = {
-		.name = "hsdma-mt7621",
+		.name = KBUILD_MODNAME,
 		.of_match_table = mtk_hsdma_of_match,
 	},
 };
Signature · 7 lines
2.30.0


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#1 lore raw
Quoted 10 lines · Ilya Lipnitskiy

Also use KBUILD_MODNAME for module name.

This driver is only used by RALINK MIPS MT7621 SoCs. Tested by building against that target using OpenWrt with Linux 5.10.10.

Fixes the following error:
error: the following would cause module name conflict:
drivers/dma/mediatek/mtk-hsdma.ko drivers/staging/mt7621-dma/mtk-hsdma.ko

The only part of this commit message that I could understand at all was the parts which were copy and pasted from the build system... :/ Please, write it like this:

[PATCH] staging/mt7621-dma: fix build conflict

This driver cannot be built because we have two modules with the same name and it leads to an error:

error: the following would cause module name conflict:

    drivers/dma/mediatek/mtk-hsdma.ko
    drivers/staging/mt7621-dma/mtk-hsdma.ko

The fix is to rename mtk-hsdma.c to hsdma-mt7621.c. Also we can use the KBUILD_MODNAME where appropriate instead of hard coding the name.

regards,
dan carpenter

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek