All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Gwendal Grignou <gwendal@chromium.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 04/13] iio:accel:bma400: Move exports into BMA400 namespace
Date: Thu, 30 Dec 2021 19:33:22 +0000	[thread overview]
Message-ID: <20211230193331.283503-5-jic23@kernel.org> (raw)
In-Reply-To: <20211230193331.283503-1-jic23@kernel.org>

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

In order to avoid unnecessary pollution of the global symbol namespace
move the core bma400 functions into a bma400 specific namespace
and import that into the two bus modules.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/iio/accel/bma400_core.c | 6 +++---
 drivers/iio/accel/bma400_i2c.c  | 1 +
 drivers/iio/accel/bma400_spi.c  | 1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/accel/bma400_core.c b/drivers/iio/accel/bma400_core.c
index fd2647b728d3..f623af18fec0 100644
--- a/drivers/iio/accel/bma400_core.c
+++ b/drivers/iio/accel/bma400_core.c
@@ -136,7 +136,7 @@ const struct regmap_config bma400_regmap_config = {
 	.writeable_reg = bma400_is_writable_reg,
 	.volatile_reg = bma400_is_volatile_reg,
 };
-EXPORT_SYMBOL(bma400_regmap_config);
+EXPORT_SYMBOL_NS(bma400_regmap_config, BMA400);
 
 static const struct iio_mount_matrix *
 bma400_accel_get_mount_matrix(const struct iio_dev *indio_dev,
@@ -826,7 +826,7 @@ int bma400_probe(struct device *dev, struct regmap *regmap, const char *name)
 
 	return iio_device_register(indio_dev);
 }
-EXPORT_SYMBOL(bma400_probe);
+EXPORT_SYMBOL_NS(bma400_probe, BMA400);
 
 void bma400_remove(struct device *dev)
 {
@@ -846,7 +846,7 @@ void bma400_remove(struct device *dev)
 
 	iio_device_unregister(indio_dev);
 }
-EXPORT_SYMBOL(bma400_remove);
+EXPORT_SYMBOL_NS(bma400_remove, BMA400);
 
 MODULE_AUTHOR("Dan Robertson <dan@dlrobertson.com>");
 MODULE_DESCRIPTION("Bosch BMA400 triaxial acceleration sensor core");
diff --git a/drivers/iio/accel/bma400_i2c.c b/drivers/iio/accel/bma400_i2c.c
index f50df5310beb..126fcfccfc9c 100644
--- a/drivers/iio/accel/bma400_i2c.c
+++ b/drivers/iio/accel/bma400_i2c.c
@@ -61,3 +61,4 @@ module_i2c_driver(bma400_i2c_driver);
 MODULE_AUTHOR("Dan Robertson <dan@dlrobertson.com>");
 MODULE_DESCRIPTION("Bosch BMA400 triaxial acceleration sensor (I2C)");
 MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS(BMA400);
diff --git a/drivers/iio/accel/bma400_spi.c b/drivers/iio/accel/bma400_spi.c
index 9f622e37477b..31f7cd1e90e9 100644
--- a/drivers/iio/accel/bma400_spi.c
+++ b/drivers/iio/accel/bma400_spi.c
@@ -120,3 +120,4 @@ module_spi_driver(bma400_spi_driver);
 MODULE_AUTHOR("Dan Robertson <dan@dlrobertson.com>");
 MODULE_DESCRIPTION("Bosch BMA400 triaxial acceleration sensor (SPI)");
 MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS(BMA400);
-- 
2.34.1


  parent reply	other threads:[~2021-12-30 19:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30 19:33 [PATCH 00/13] IIO: accel/st-sensors move into separate symbol namespaces Jonathan Cameron
2021-12-30 19:33 ` [PATCH 01/13] iio:accel:mma9551_core: Move exports into MMA9551 namespace Jonathan Cameron
2021-12-30 19:33 ` [PATCH 02/13] iio:accel:mma7455_core: Move exports into MMA7455 namespace Jonathan Cameron
2021-12-31 10:41   ` Uwe Kleine-König
2021-12-31 18:40     ` Jonathan Cameron
2021-12-30 19:33 ` [PATCH 03/13] iio:accel:kxsd9: Move exports into KDSD9 namespace Jonathan Cameron
2021-12-30 19:33 ` Jonathan Cameron [this message]
2021-12-30 19:33 ` [PATCH 05/13] iio:accel:adxl313: Move exports into ADXL313 namespace Jonathan Cameron
2021-12-30 19:33 ` [PATCH 06/13] iio:accel:adxl345: Move exports into ADXL345 namespace Jonathan Cameron
2021-12-30 19:33 ` [PATCH 07/13] iio:accel:adxl355: Move exports into ADXL355 namespace Jonathan Cameron
2021-12-30 19:33 ` [PATCH 08/13] iio:accel:adxl372: Move exports into ADXL372 namespace Jonathan Cameron
2021-12-30 19:33 ` [PATCH 09/13] iio:accel:bmc150: Move exports into BMC150 namespace Jonathan Cameron
2021-12-31  1:40   ` srinivas pandruvada
2021-12-30 19:33 ` [PATCH 10/13] iio:accel:bmi088: Move exports into BMI088 namespace Jonathan Cameron
2021-12-30 19:33 ` [PATCH 11/13] iio:accel:fxl8962af: Move exports into FXL8962AF namespace Jonathan Cameron
2021-12-30 19:33 ` [PATCH 12/13] iio:st-sensors: Remove duplicate MODULE_* Jonathan Cameron
2022-01-02  6:58   ` Linus Walleij
2021-12-30 19:33 ` [PATCH 13/13] iio:st-sensors: Move exports into ST_SENSORS namespace Jonathan Cameron
2022-01-05 18:43   ` Gwendal Grignou
2022-01-06 13:41     ` Jonathan Cameron
2022-01-06 14:42       ` Andy Shevchenko
2022-01-06 14:48         ` Jonathan Cameron
2022-01-02  6:57 ` [PATCH 00/13] IIO: accel/st-sensors move into separate symbol namespaces Linus Walleij

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=20211230193331.283503-5-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=gwendal@chromium.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    /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 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.