From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/7] iio: accel: bmc150: Explicitly set .driver_data
Date: Tue, 19 May 2026 10:13:04 +0200 [thread overview]
Message-ID: <7ff04e7dd864ed05df875174a29ade662135b683.1779136001.git.u.kleine-koenig@baylibre.com> (raw)
In-Reply-To: <cover.1779136001.git.u.kleine-koenig@baylibre.com>
There is one id entry that has an explicit assignment to .driver_data.
To make the intention clearer, assign BOSCH_UNKNOWN (which is also 0)
for all previously ids that had .driver_data = 0 implicitly before.
While touching all entries in this array, convert to named initializers.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
drivers/iio/accel/bmc150-accel-i2c.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/iio/accel/bmc150-accel-i2c.c b/drivers/iio/accel/bmc150-accel-i2c.c
index b4604f441553..3315172742d0 100644
--- a/drivers/iio/accel/bmc150-accel-i2c.c
+++ b/drivers/iio/accel/bmc150-accel-i2c.c
@@ -245,16 +245,16 @@ static const struct acpi_device_id bmc150_accel_acpi_match[] = {
MODULE_DEVICE_TABLE(acpi, bmc150_accel_acpi_match);
static const struct i2c_device_id bmc150_accel_id[] = {
- {"bma222"},
- {"bma222e"},
- {"bma250e"},
- {"bma253"},
- {"bma254"},
- {"bma255"},
- {"bma280"},
- {"bmc150_accel"},
- {"bmc156_accel", BOSCH_BMC156},
- {"bmi055_accel"},
+ { .name = "bma222", .driver_data = BOSCH_UNKNOWN },
+ { .name = "bma222e", .driver_data = BOSCH_UNKNOWN },
+ { .name = "bma250e", .driver_data = BOSCH_UNKNOWN },
+ { .name = "bma253", .driver_data = BOSCH_UNKNOWN },
+ { .name = "bma254", .driver_data = BOSCH_UNKNOWN },
+ { .name = "bma255", .driver_data = BOSCH_UNKNOWN },
+ { .name = "bma280", .driver_data = BOSCH_UNKNOWN },
+ { .name = "bmc150_accel", .driver_data = BOSCH_UNKNOWN },
+ { .name = "bmc156_accel", .driver_data = BOSCH_BMC156 },
+ { .name = "bmi055_accel", .driver_data = BOSCH_UNKNOWN },
{ }
};
--
2.47.3
next prev parent reply other threads:[~2026-05-19 8:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 8:13 [PATCH v2 0/7] iio: Rework i2c_device_id initialisation Uwe Kleine-König (The Capable Hub)
2026-05-19 8:13 ` [PATCH v2 1/7] iio: Drop unused driver_data in four i2c drivers Uwe Kleine-König (The Capable Hub)
2026-05-19 8:13 ` Uwe Kleine-König (The Capable Hub) [this message]
2026-05-19 18:42 ` [PATCH v2 2/7] iio: accel: bmc150: Explicitly set .driver_data Jonathan Cameron
2026-05-19 8:13 ` [PATCH v2 3/7] iio: adc: ad7091r5: Simplify driver_data handling Uwe Kleine-König (The Capable Hub)
2026-05-19 18:49 ` Jonathan Cameron
2026-05-21 17:15 ` Marcelo Schmitt
2026-05-22 11:59 ` Jonathan Cameron
2026-05-19 8:13 ` [PATCH v2 4/7] iio: dac: max5821: Drop unused i2c driver data Uwe Kleine-König (The Capable Hub)
2026-05-19 19:06 ` Jonathan Cameron
2026-05-19 8:13 ` [PATCH v2 5/7] iio: proximity: sx9324: Drop unused " Uwe Kleine-König (The Capable Hub)
2026-05-19 19:08 ` Jonathan Cameron
2026-05-19 8:13 ` [PATCH v2 6/7] iio: proximity: sx9360: " Uwe Kleine-König (The Capable Hub)
2026-05-19 19:09 ` Jonathan Cameron
2026-05-19 8:13 ` [PATCH v2 7/7] iio: Initialize i2c_device_id arrays using member names Uwe Kleine-König (The Capable Hub)
2026-05-19 11:35 ` Matti Vaittinen
2026-05-19 15:46 ` Sirat
2026-05-19 18:39 ` Jonathan Cameron
2026-05-19 19:51 ` Uwe Kleine-König (The Capable Hub)
2026-05-21 12:04 ` Jonathan Cameron
2026-05-21 13:20 ` Uwe Kleine-König (The Capable Hub)
2026-05-22 11:10 ` Jonathan Cameron
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=7ff04e7dd864ed05df875174a29ade662135b683.1779136001.git.u.kleine-koenig@baylibre.com \
--to=u.kleine-koenig@baylibre.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/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®