From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: "David Rhodes" <david.rhodes@cirrus.com>,
"Richard Fitzgerald" <rf@opensource.cirrus.com>,
"Martin Povišer" <povik+lin@cutebit.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Kiseok Jo" <kiseok.jo@irondevice.com>,
"Binbin Zhou" <zhoubinbin@loongson.cn>,
"Tang Bin" <tangbin@cmss.chinamobile.com>,
"Harshit Mogalapalli" <harshit.m.mogalapalli@oracle.com>,
"Yang Li" <yang.lee@linux.alibaba.com>,
"Igor Prusov" <ivprusov@salutedevices.com>,
linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
asahi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: Drop explicit initialization of struct i2c_device_id::driver_data to 0
Date: Mon, 2 Dec 2024 12:36:41 +0100 [thread overview]
Message-ID: <20241202113641.1003836-2-u.kleine-koenig@baylibre.com> (raw)
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>
---
Hello,
this is the third iteration of this patch (after
ba2a2c378ada ("ASoC: codecs: Drop explicit initialization of struct i2c_device_id::driver_data to 0")
6f9faf1410fe ("ASoC: codecs: Drop explicit initialization of struct i2c_device_id::driver_data to 0")
these unused zeros seem to repopup even though in the mean time most
templates should be fine.
Best regards
Uwe
sound/soc/codecs/cs42l84.c | 2 +-
sound/soc/codecs/es8323.c | 2 +-
sound/soc/codecs/ntp8835.c | 2 +-
sound/soc/codecs/ntp8918.c | 2 +-
sound/soc/codecs/sma1307.c | 4 ++--
sound/soc/codecs/uda1342.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/cs42l84.c b/sound/soc/codecs/cs42l84.c
index 17d5c96e334d..88cf3c03986e 100644
--- a/sound/soc/codecs/cs42l84.c
+++ b/sound/soc/codecs/cs42l84.c
@@ -1087,7 +1087,7 @@ static const struct of_device_id cs42l84_of_match[] = {
MODULE_DEVICE_TABLE(of, cs42l84_of_match);
static const struct i2c_device_id cs42l84_id[] = {
- {"cs42l84", 0},
+ { "cs42l84" },
{}
};
MODULE_DEVICE_TABLE(i2c, cs42l84_id);
diff --git a/sound/soc/codecs/es8323.c b/sound/soc/codecs/es8323.c
index 6f4fa36ea34d..a9822998199f 100644
--- a/sound/soc/codecs/es8323.c
+++ b/sound/soc/codecs/es8323.c
@@ -758,7 +758,7 @@ static int es8323_i2c_probe(struct i2c_client *i2c_client)
}
static const struct i2c_device_id es8323_i2c_id[] = {
- { "es8323", 0 },
+ { "es8323" },
{ }
};
MODULE_DEVICE_TABLE(i2c, es8323_i2c_id);
diff --git a/sound/soc/codecs/ntp8835.c b/sound/soc/codecs/ntp8835.c
index 796e1410496f..2cc4c6395f55 100644
--- a/sound/soc/codecs/ntp8835.c
+++ b/sound/soc/codecs/ntp8835.c
@@ -454,7 +454,7 @@ static int ntp8835_i2c_probe(struct i2c_client *i2c)
}
static const struct i2c_device_id ntp8835_i2c_id[] = {
- { "ntp8835", 0 },
+ { "ntp8835" },
{}
};
MODULE_DEVICE_TABLE(i2c, ntp8835_i2c_id);
diff --git a/sound/soc/codecs/ntp8918.c b/sound/soc/codecs/ntp8918.c
index 0493ab6acbe4..a332893fc51d 100644
--- a/sound/soc/codecs/ntp8918.c
+++ b/sound/soc/codecs/ntp8918.c
@@ -371,7 +371,7 @@ static int ntp8918_i2c_probe(struct i2c_client *i2c)
}
static const struct i2c_device_id ntp8918_i2c_id[] = {
- { "ntp8918", 0 },
+ { "ntp8918" },
{}
};
MODULE_DEVICE_TABLE(i2c, ntp8918_i2c_id);
diff --git a/sound/soc/codecs/sma1307.c b/sound/soc/codecs/sma1307.c
index f2cea6186d98..480bcea48541 100644
--- a/sound/soc/codecs/sma1307.c
+++ b/sound/soc/codecs/sma1307.c
@@ -2011,8 +2011,8 @@ static void sma1307_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id sma1307_i2c_id[] = {
- { "sma1307a", 0 },
- { "sma1307aq", 0 },
+ { "sma1307a" },
+ { "sma1307aq" },
{ }
};
diff --git a/sound/soc/codecs/uda1342.c b/sound/soc/codecs/uda1342.c
index 3d49a7869948..b0b29012842d 100644
--- a/sound/soc/codecs/uda1342.c
+++ b/sound/soc/codecs/uda1342.c
@@ -319,7 +319,7 @@ static DEFINE_RUNTIME_DEV_PM_OPS(uda1342_pm_ops,
uda1342_suspend, uda1342_resume, NULL);
static const struct i2c_device_id uda1342_i2c_id[] = {
- { "uda1342", 0 },
+ { "uda1342" },
{ }
};
MODULE_DEVICE_TABLE(i2c, uda1342_i2c_id);
base-commit: f486c8aa16b8172f63bddc70116a0c897a7f3f02
--
2.45.2
next reply other threads:[~2024-12-02 11:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 11:36 Uwe Kleine-König [this message]
2024-12-03 14:41 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241202113641.1003836-2-u.kleine-koenig@baylibre.com \
--to=u.kleine-koenig@baylibre.com \
--cc=asahi@lists.linux.dev \
--cc=broonie@kernel.org \
--cc=david.rhodes@cirrus.com \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=ivprusov@salutedevices.com \
--cc=kiseok.jo@irondevice.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=povik+lin@cutebit.org \
--cc=rf@opensource.cirrus.com \
--cc=tangbin@cmss.chinamobile.com \
--cc=tiwai@suse.com \
--cc=yang.lee@linux.alibaba.com \
--cc=zhoubinbin@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®