* [PATCH] ALSA: Drop explicit initialization of struct i2c_device_id::driver_data to 0
@ 2024-09-20 15:10 Uwe Kleine-König
2024-09-20 15:45 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2024-09-20 15:10 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai
Cc: Johannes Berg, David Rhodes, Richard Fitzgerald, Shenghao Ding,
Kevin Lu, Baojun Xu, linuxppc-dev, alsa-devel, linux-sound,
linux-kernel, patches
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>
---
sound/aoa/codecs/onyx.c | 2 +-
sound/aoa/codecs/tas.c | 2 +-
sound/pci/hda/cs35l41_hda_i2c.c | 2 +-
sound/pci/hda/tas2781_hda_i2c.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
index e90e03bb0dc0..ac347a14f282 100644
--- a/sound/aoa/codecs/onyx.c
+++ b/sound/aoa/codecs/onyx.c
@@ -1040,7 +1040,7 @@ static void onyx_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id onyx_i2c_id[] = {
- { "MAC,pcm3052", 0 },
+ { "MAC,pcm3052" },
{ }
};
MODULE_DEVICE_TABLE(i2c,onyx_i2c_id);
diff --git a/sound/aoa/codecs/tas.c b/sound/aoa/codecs/tas.c
index be9822ebf9f8..804b2ebbe28f 100644
--- a/sound/aoa/codecs/tas.c
+++ b/sound/aoa/codecs/tas.c
@@ -927,7 +927,7 @@ static void tas_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id tas_i2c_id[] = {
- { "MAC,tas3004", 0 },
+ { "MAC,tas3004" },
{ }
};
MODULE_DEVICE_TABLE(i2c,tas_i2c_id);
diff --git a/sound/pci/hda/cs35l41_hda_i2c.c b/sound/pci/hda/cs35l41_hda_i2c.c
index 603e9bff3a71..bb84740c8520 100644
--- a/sound/pci/hda/cs35l41_hda_i2c.c
+++ b/sound/pci/hda/cs35l41_hda_i2c.c
@@ -39,7 +39,7 @@ static void cs35l41_hda_i2c_remove(struct i2c_client *clt)
}
static const struct i2c_device_id cs35l41_hda_i2c_id[] = {
- { "cs35l41-hda", 0 },
+ { "cs35l41-hda" },
{}
};
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index f58f434e7110..4b9dc84ce6bb 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -951,7 +951,7 @@ static const struct dev_pm_ops tas2781_hda_pm_ops = {
};
static const struct i2c_device_id tas2781_hda_i2c_id[] = {
- { "tas2781-hda", 0 },
+ { "tas2781-hda" },
{}
};
base-commit: 62f92d634458a1e308bb699986b9147a6d670457
--
2.45.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ALSA: Drop explicit initialization of struct i2c_device_id::driver_data to 0
2024-09-20 15:10 [PATCH] ALSA: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Uwe Kleine-König
@ 2024-09-20 15:45 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2024-09-20 15:45 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Jaroslav Kysela, Takashi Iwai, Johannes Berg, David Rhodes,
Richard Fitzgerald, Shenghao Ding, Kevin Lu, Baojun Xu,
linuxppc-dev, alsa-devel, linux-sound, linux-kernel, patches
On Fri, 20 Sep 2024 17:10:08 +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>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-20 15:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 15:10 [PATCH] ALSA: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Uwe Kleine-König
2024-09-20 15:45 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox