Message ID | 20250319-al3010-iio-regmap-v2-3-1310729d0543@ixit.cz (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | iio: light: Modernize al3010 and al3320a codebase | expand |
On Wed, 19 Mar 2025 21:59:42 +0100 David Heidelberg via B4 Relay <devnull+david.ixit.cz@kernel.org> wrote: > From: David Heidelberg <david@ixit.cz> > > The driver name should be passed directly. > > Signed-off-by: David Heidelberg <david@ixit.cz> Also things I'd generally not worry too much about in existing code. Given they are part of a larger series though I'll take them. Applied 3-4 > --- > drivers/iio/light/al3010.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/light/al3010.c b/drivers/iio/light/al3010.c > index 4c2fd88ab32cd73f4735b0fa3014af084037c94d..7fe91049b55e57558aef69d088d168437a6819ec 100644 > --- a/drivers/iio/light/al3010.c > +++ b/drivers/iio/light/al3010.c > @@ -22,8 +22,6 @@ > #include <linux/iio/iio.h> > #include <linux/iio/sysfs.h> > > -#define AL3010_DRV_NAME "al3010" > - > #define AL3010_REG_SYSTEM 0x00 > #define AL3010_REG_DATA_LOW 0x0c > #define AL3010_REG_CONFIG 0x10 > @@ -184,7 +182,7 @@ static int al3010_probe(struct i2c_client *client) > data->client = client; > > indio_dev->info = &al3010_info; > - indio_dev->name = AL3010_DRV_NAME; > + indio_dev->name = "al3010"; > indio_dev->channels = al3010_channels; > indio_dev->num_channels = ARRAY_SIZE(al3010_channels); > indio_dev->modes = INDIO_DIRECT_MODE; > @@ -224,7 +222,7 @@ MODULE_DEVICE_TABLE(of, al3010_of_match); > > static struct i2c_driver al3010_driver = { > .driver = { > - .name = AL3010_DRV_NAME, > + .name = "al3010", > .of_match_table = al3010_of_match, > .pm = pm_sleep_ptr(&al3010_pm_ops), > }, >
diff --git a/drivers/iio/light/al3010.c b/drivers/iio/light/al3010.c index 4c2fd88ab32cd73f4735b0fa3014af084037c94d..7fe91049b55e57558aef69d088d168437a6819ec 100644 --- a/drivers/iio/light/al3010.c +++ b/drivers/iio/light/al3010.c @@ -22,8 +22,6 @@ #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> -#define AL3010_DRV_NAME "al3010" - #define AL3010_REG_SYSTEM 0x00 #define AL3010_REG_DATA_LOW 0x0c #define AL3010_REG_CONFIG 0x10 @@ -184,7 +182,7 @@ static int al3010_probe(struct i2c_client *client) data->client = client; indio_dev->info = &al3010_info; - indio_dev->name = AL3010_DRV_NAME; + indio_dev->name = "al3010"; indio_dev->channels = al3010_channels; indio_dev->num_channels = ARRAY_SIZE(al3010_channels); indio_dev->modes = INDIO_DIRECT_MODE; @@ -224,7 +222,7 @@ MODULE_DEVICE_TABLE(of, al3010_of_match); static struct i2c_driver al3010_driver = { .driver = { - .name = AL3010_DRV_NAME, + .name = "al3010", .of_match_table = al3010_of_match, .pm = pm_sleep_ptr(&al3010_pm_ops), },