All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/7] iio: accel: st_accel: Move platform data from header to C file
@ 2021-04-14 19:54 Andy Shevchenko
  2021-04-14 19:54 ` [PATCH v1 2/7] iio: gyro: st_gyro: " Andy Shevchenko
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Andy Shevchenko @ 2021-04-14 19:54 UTC (permalink / raw)
  To: Jonathan Cameron, Gaëtan André,
	Andy Shevchenko, Nuno Sá,
	Denis Ciocca, linux-iio, devicetree, linux-kernel
  Cc: Jonathan Cameron, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring

Platform data is solely used by one file. Don't share it with others.

While at it, drop unneeded anymore __maybe_unused and fix kernel doc
to avoid warning:

  st_accel_core.c:1079: error: Cannot parse struct or union!

by converting to a simple comment. It is described at the declaration.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/iio/accel/st_accel.h      | 8 --------
 drivers/iio/accel/st_accel_core.c | 5 +++++
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
index 5d356288e001..181ebe79c4eb 100644
--- a/drivers/iio/accel/st_accel.h
+++ b/drivers/iio/accel/st_accel.h
@@ -62,14 +62,6 @@ enum st_accel_type {
 #define LIS2DE12_ACCEL_DEV_NAME		"lis2de12"
 #define LIS2HH12_ACCEL_DEV_NAME		"lis2hh12"
 
-/**
-* struct st_sensors_platform_data - default accel platform data
-* @drdy_int_pin: default accel DRDY is available on INT1 pin.
-*/
-static __maybe_unused const struct st_sensors_platform_data default_accel_pdata = {
-	.drdy_int_pin = 1,
-};
-
 const struct st_sensor_settings *st_accel_get_settings(const char *name);
 int st_accel_common_probe(struct iio_dev *indio_dev);
 void st_accel_common_remove(struct iio_dev *indio_dev);
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index 43c50167d220..a1bd7e3b912e 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -983,6 +983,11 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
 
 };
 
+/* Default accel DRDY is available on INT1 pin */
+static const struct st_sensors_platform_data default_accel_pdata = {
+	.drdy_int_pin = 1,
+};
+
 static int st_accel_read_raw(struct iio_dev *indio_dev,
 			struct iio_chan_spec const *ch, int *val,
 							int *val2, long mask)
-- 
2.30.2


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

end of thread, other threads:[~2021-05-03 12:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 19:54 [PATCH v1 1/7] iio: accel: st_accel: Move platform data from header to C file Andy Shevchenko
2021-04-14 19:54 ` [PATCH v1 2/7] iio: gyro: st_gyro: " Andy Shevchenko
2021-04-14 19:54 ` [PATCH v1 3/7] iio: magnetometer: st_magn: Provide default platform data Andy Shevchenko
2021-04-14 19:54 ` [PATCH v1 4/7] iio: st_sensors: Call st_sensors_power_enable() from bus drivers Andy Shevchenko
2021-04-18 10:54   ` Jonathan Cameron
2021-04-18 13:36     ` Andy Shevchenko
2021-04-18 19:09     ` Andy Shevchenko
2021-04-14 19:54 ` [PATCH v1 5/7] iio: st_sensors: Make accel, gyro, magn and pressure probe shared Andy Shevchenko
2021-04-14 19:54 ` [PATCH v1 6/7] iio: st_sensors: Add lsm9ds0 IMU support Andy Shevchenko
2021-04-18 11:06   ` Jonathan Cameron
2021-04-18 13:49     ` Andy Shevchenko
2021-04-18 13:59       ` Andy Shevchenko
2021-04-18 16:45         ` Jonathan Cameron
2021-04-14 19:54 ` [PATCH v1 7/7] dt-bindings: iio: st,st-sensors: Add LSM9DS0 compatible string Andy Shevchenko
2021-04-20 19:55   ` Rob Herring
2021-05-03 12:09   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.