Skip to content

Commit be1d3aa

Browse files
hvilleneuvedoogregkh
authored andcommitted
serial: sc16is7xx: 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: Hugo Villeneuve <hvilleneuve@dimonoff.com> Link: https://patch.msgid.link/20251027142957.1032073-12-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 555d7b3 commit be1d3aa

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

drivers/tty/serial/sc16is7xx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static DEFINE_IDA(sc16is7xx_lines);
361361

362362
static struct uart_driver sc16is7xx_uart = {
363363
.owner = THIS_MODULE,
364-
.driver_name = SC16IS7XX_NAME,
364+
.driver_name = KBUILD_MODNAME,
365365
.dev_name = "ttySC",
366366
.nr = SC16IS7XX_MAX_DEVS,
367367
};
@@ -1808,4 +1808,4 @@ module_exit(sc16is7xx_exit);
18081808

18091809
MODULE_LICENSE("GPL");
18101810
MODULE_AUTHOR("Jon Ringle <jringle@gridpoint.com>");
1811-
MODULE_DESCRIPTION("SC16IS7xx tty serial core driver");
1811+
MODULE_DESCRIPTION(KBUILD_MODNAME " tty serial core driver");

drivers/tty/serial/sc16is7xx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <linux/regmap.h>
99
#include <linux/types.h>
1010

11-
#define SC16IS7XX_NAME "sc16is7xx"
1211
#define SC16IS7XX_MAX_PORTS 2 /* Maximum number of UART ports per IC. */
1312

1413
struct device;

drivers/tty/serial/sc16is7xx_i2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ MODULE_DEVICE_TABLE(i2c, sc16is7xx_i2c_id_table);
5252

5353
static struct i2c_driver sc16is7xx_i2c_driver = {
5454
.driver = {
55-
.name = SC16IS7XX_NAME,
55+
.name = KBUILD_MODNAME,
5656
.of_match_table = sc16is7xx_dt_ids,
5757
},
5858
.probe = sc16is7xx_i2c_probe,
@@ -63,5 +63,5 @@ static struct i2c_driver sc16is7xx_i2c_driver = {
6363
module_i2c_driver(sc16is7xx_i2c_driver);
6464

6565
MODULE_LICENSE("GPL");
66-
MODULE_DESCRIPTION("SC16IS7xx I2C interface driver");
66+
MODULE_DESCRIPTION(KBUILD_MODNAME " interface driver");
6767
MODULE_IMPORT_NS("SERIAL_NXP_SC16IS7XX");

drivers/tty/serial/sc16is7xx_spi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ MODULE_DEVICE_TABLE(spi, sc16is7xx_spi_id_table);
7575

7676
static struct spi_driver sc16is7xx_spi_driver = {
7777
.driver = {
78-
.name = SC16IS7XX_NAME,
78+
.name = KBUILD_MODNAME,
7979
.of_match_table = sc16is7xx_dt_ids,
8080
},
8181
.probe = sc16is7xx_spi_probe,
@@ -86,5 +86,5 @@ static struct spi_driver sc16is7xx_spi_driver = {
8686
module_spi_driver(sc16is7xx_spi_driver);
8787

8888
MODULE_LICENSE("GPL");
89-
MODULE_DESCRIPTION("SC16IS7xx SPI interface driver");
89+
MODULE_DESCRIPTION(KBUILD_MODNAME " interface driver");
9090
MODULE_IMPORT_NS("SERIAL_NXP_SC16IS7XX");

0 commit comments

Comments
 (0)