public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH GIT PULL] w1: ds2482: Drop explicit initialization of struct i2c_device_id::driver_data to 0
@ 2024-09-06 14:11 Krzysztof Kozlowski
  2024-09-06 17:19 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2024-09-06 14:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Uwe Kleine-König, linux-kernel, krzk, Krzysztof Kozlowski

From: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

This driver doesn'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: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240725160909.326143-2-u.kleine-koenig@baylibre.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---

Hi Greg,

I have only one patch for you in my queue.

Best regards,
Krzysztof

 drivers/w1/masters/ds2482.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
index b2d76c1784bd..a2ecbb863c57 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/drivers/w1/masters/ds2482.c
@@ -541,8 +541,8 @@ static void ds2482_remove(struct i2c_client *client)
  * Driver data (common to all clients)
  */
 static const struct i2c_device_id ds2482_id[] = {
-	{ "ds2482", 0 },
-	{ "ds2484", 0 },
+	{ "ds2482" },
+	{ "ds2484" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ds2482_id);
-- 
2.43.0


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

* Re: [PATCH GIT PULL] w1: ds2482: Drop explicit initialization of struct i2c_device_id::driver_data to 0
  2024-09-06 14:11 [PATCH GIT PULL] w1: ds2482: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Krzysztof Kozlowski
@ 2024-09-06 17:19 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2024-09-06 17:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Uwe Kleine-König, linux-kernel, krzk

On Fri, Sep 06, 2024 at 04:11:33PM +0200, Krzysztof Kozlowski wrote:
> From: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> 
> This driver doesn'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: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Link: https://lore.kernel.org/r/20240725160909.326143-2-u.kleine-koenig@baylibre.com
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> 
> Hi Greg,
> 
> I have only one patch for you in my queue.

THanks, now applied.

greg k-h

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

end of thread, other threads:[~2024-09-06 17:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-06 14:11 [PATCH GIT PULL] w1: ds2482: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Krzysztof Kozlowski
2024-09-06 17:19 ` Greg Kroah-Hartman

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