Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: adc: ti-ads1119: Drop explicit initialization of struct i2c_device_id::driver_data to 0
@ 2024-09-20 15:34 Uwe Kleine-König
  2024-09-20 16:18 ` João Paulo Gonçalves
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2024-09-20 15:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Francesco Dolcini, João Paulo Gonçalves,
	Lars-Peter Clausen, linux-iio

These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/iio/adc/ti-ads1119.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ti-ads1119.c b/drivers/iio/adc/ti-ads1119.c
index 1c7606375149..e9d9d4d46d38 100644
--- a/drivers/iio/adc/ti-ads1119.c
+++ b/drivers/iio/adc/ti-ads1119.c
@@ -804,7 +804,7 @@ static const struct of_device_id __maybe_unused ads1119_of_match[] = {
 MODULE_DEVICE_TABLE(of, ads1119_of_match);
 
 static const struct i2c_device_id ads1119_id[] = {
-	{ "ads1119", 0 },
+	{ "ads1119" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ads1119_id);

base-commit: 62f92d634458a1e308bb699986b9147a6d670457
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: adc: ti-ads1119: Drop explicit initialization of struct i2c_device_id::driver_data to 0
  2024-09-20 15:34 [PATCH] iio: adc: ti-ads1119: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Uwe Kleine-König
@ 2024-09-20 16:18 ` João Paulo Gonçalves
  2024-09-28 15:51   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: João Paulo Gonçalves @ 2024-09-20 16:18 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Jonathan Cameron, Francesco Dolcini, Lars-Peter Clausen,
	linux-iio

On Fri, Sep 20, 2024 at 05:34:29PM +0200, Uwe Kleine-König wrote:
> These drivers don't use the driver_data member of struct i2c_device_id,
> so don't explicitly initialize this member.
>
> This prepares putting driver_data in an anonymous union which requires
> either no initialization or named designators. But it's also a nice
> cleanup on its own.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Reviewed-by: João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com>

Best Regards,
João Paulo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: adc: ti-ads1119: Drop explicit initialization of struct i2c_device_id::driver_data to 0
  2024-09-20 16:18 ` João Paulo Gonçalves
@ 2024-09-28 15:51   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2024-09-28 15:51 UTC (permalink / raw)
  To: João Paulo Gonçalves
  Cc: Uwe Kleine-König, Francesco Dolcini, Lars-Peter Clausen,
	linux-iio

On Fri, 20 Sep 2024 18:18:47 +0200
João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com> wrote:

> On Fri, Sep 20, 2024 at 05:34:29PM +0200, Uwe Kleine-König wrote:
> > These drivers don't use the driver_data member of struct i2c_device_id,
> > so don't explicitly initialize this member.
> >
> > This prepares putting driver_data in an anonymous union which requires
> > either no initialization or named designators. But it's also a nice
> > cleanup on its own.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>  
> 
> Reviewed-by: João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com>
Applied.

Thanks,

> 
> Best Regards,
> João Paulo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-28 15:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 15:34 [PATCH] iio: adc: ti-ads1119: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Uwe Kleine-König
2024-09-20 16:18 ` João Paulo Gonçalves
2024-09-28 15:51   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox