Skip to content

Commit bc9c7e5

Browse files
tklausergregkh
authored andcommitted
serial: altera_uart: Use KBUILD_MODNAME
There is no need to redefine the driver name. Use KBUILD_MODNAME and get rid of DRV_NAME altogether. Signed-off-by: Tobias Klauser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 535a076 commit bc9c7e5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/tty/serial/altera_uart.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <linux/io.h>
2525
#include <linux/altera_uart.h>
2626

27-
#define DRV_NAME "altera_uart"
2827
#define SERIAL_ALTERA_MAJOR 204
2928
#define SERIAL_ALTERA_MINOR 213
3029

@@ -518,7 +517,7 @@ OF_EARLYCON_DECLARE(uart, "altr,uart-1.0", altera_uart_earlycon_setup);
518517
*/
519518
static struct uart_driver altera_uart_driver = {
520519
.owner = THIS_MODULE,
521-
.driver_name = DRV_NAME,
520+
.driver_name = KBUILD_MODNAME,
522521
.dev_name = "ttyAL",
523522
.major = SERIAL_ALTERA_MAJOR,
524523
.minor = SERIAL_ALTERA_MINOR,
@@ -619,7 +618,7 @@ static struct platform_driver altera_uart_platform_driver = {
619618
.probe = altera_uart_probe,
620619
.remove = altera_uart_remove,
621620
.driver = {
622-
.name = DRV_NAME,
621+
.name = KBUILD_MODNAME,
623622
.of_match_table = of_match_ptr(altera_uart_match),
624623
},
625624
};
@@ -649,5 +648,5 @@ module_exit(altera_uart_exit);
649648
MODULE_DESCRIPTION("Altera UART driver");
650649
MODULE_AUTHOR("Thomas Chou <[email protected]>");
651650
MODULE_LICENSE("GPL");
652-
MODULE_ALIAS("platform:" DRV_NAME);
651+
MODULE_ALIAS("platform:" KBUILD_MODNAME);
653652
MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_ALTERA_MAJOR);

0 commit comments

Comments
 (0)