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>,
	lars@metafoo.de, Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Paul Cercueil <paul@crapouillou.net>
Subject: [PATCH 02/16] iio:adc:ad7091r: Move exports into IIO_AD7091R namespace.
Date: Sun, 30 Jan 2022 20:56:47 +0000	[thread overview]
Message-ID: <20220130205701.334592-3-jic23@kernel.org> (raw)
In-Reply-To: <20220130205701.334592-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/library functions into a specific namespace and import
that into the various specific device drivers that use them.

For more information see https://lwn.net/Articles/760045/

An alternative here would be to conclude that we are unlikely to see
support for the other ad7091r parts in the near future and just merge
the two modules into one supporting just the i2c -5 variant.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Paul Cercueil <paul@crapouillou.net>
---
 drivers/iio/adc/ad7091r-base.c | 4 ++--
 drivers/iio/adc/ad7091r5.c     | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/ad7091r-base.c b/drivers/iio/adc/ad7091r-base.c
index 63b4d6ea4566..8e252cde735b 100644
--- a/drivers/iio/adc/ad7091r-base.c
+++ b/drivers/iio/adc/ad7091r-base.c
@@ -260,7 +260,7 @@ int ad7091r_probe(struct device *dev, const char *name,
 
 	return devm_iio_device_register(dev, iio_dev);
 }
-EXPORT_SYMBOL_GPL(ad7091r_probe);
+EXPORT_SYMBOL_NS_GPL(ad7091r_probe, IIO_AD7091R);
 
 static bool ad7091r_writeable_reg(struct device *dev, unsigned int reg)
 {
@@ -290,7 +290,7 @@ const struct regmap_config ad7091r_regmap_config = {
 	.writeable_reg = ad7091r_writeable_reg,
 	.volatile_reg = ad7091r_volatile_reg,
 };
-EXPORT_SYMBOL_GPL(ad7091r_regmap_config);
+EXPORT_SYMBOL_NS_GPL(ad7091r_regmap_config, IIO_AD7091R);
 
 MODULE_AUTHOR("Beniamin Bia <beniamin.bia@analog.com>");
 MODULE_DESCRIPTION("Analog Devices AD7091Rx multi-channel converters");
diff --git a/drivers/iio/adc/ad7091r5.c b/drivers/iio/adc/ad7091r5.c
index 9665679c3ea6..47f5763023a4 100644
--- a/drivers/iio/adc/ad7091r5.c
+++ b/drivers/iio/adc/ad7091r5.c
@@ -111,3 +111,4 @@ module_i2c_driver(ad7091r5_driver);
 MODULE_AUTHOR("Beniamin Bia <beniamin.bia@analog.com>");
 MODULE_DESCRIPTION("Analog Devices AD7091R5 multi-channel ADC driver");
 MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS(IIO_AD7091R);
-- 
2.35.1


  parent reply	other threads:[~2022-01-30 20:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-30 20:56 [PATCH 00/16] 2nd set of IIO export namespaces Jonathan Cameron
2022-01-30 20:56 ` [PATCH 01/16] iio:adc:ad_sigma_delta: Move exports into IIO_AD_SIGMA_DELTA namespace Jonathan Cameron
2022-01-30 20:56 ` Jonathan Cameron [this message]
2022-01-31 13:53   ` [PATCH 02/16] iio:adc:ad7091r: Move exports into IIO_AD7091R namespace Paul Cercueil
2022-01-30 20:56 ` [PATCH 03/16] iio:adc:ad76060: Move exports into IIO_AD7606 namespace Jonathan Cameron
2022-01-30 20:56 ` [PATCH 04/16] iio:common:meas-spec: Move exports into IIO_MEAS_SPEC_SENSORS Jonathan Cameron
2022-01-30 20:56 ` [PATCH 05/16] iio:common:ssp_sensors: Move exports into IIO_SSP_SENSORS namespace Jonathan Cameron
2022-01-30 20:56 ` [PATCH 06/16] iio:dac:ad5592r: Move exports into IIO_AD5592R namespace Jonathan Cameron
2022-01-31 13:55   ` Paul Cercueil
2022-01-30 20:56 ` [PATCH 07/16] iio:dac:ad5686: Move exports into IIO_AD5686 namespace Jonathan Cameron
2022-01-30 20:56 ` [PATCH 08/16] iio:imu:adis: Move exports into IIO_ADISLIB namespace Jonathan Cameron
2022-01-30 20:56 ` [PATCH 09/16] iio:pressure:zpa2326: Move exports into IIO_ZPA2326 namespace Jonathan Cameron
2022-01-30 20:56 ` [PATCH 10/16] iio:pressure:ms5611: Move exports into IIO_MS5611 namespace Jonathan Cameron
2022-01-30 20:56 ` [PATCH 11/16] iio:pressure:mpl115: Move exports into IIO_MPL115 namespace Jonathan Cameron
2022-01-30 20:56 ` [PATCH 12/16] iio:magnetometer:rm3100: Move exports to IIO_RM3100 namespace Jonathan Cameron
2022-01-30 20:56 ` [PATCH 13/16] iio:magnetometer:bmc150: Move exports to IIO_BMC150_MAGN namespace Jonathan Cameron
2022-01-30 20:56 ` [PATCH 14/16] iio:magnetometer:hmc5843: Move exports to IIO_HMC5843 namespace Jonathan Cameron
2022-01-30 20:57 ` [PATCH 15/16] iio:light:st_uvis25: Move exports to IIO_UVIS25 namespace Jonathan Cameron
2022-01-30 20:57 ` [PATCH 16/16] iio:chemical:bme680: Move exports to IIO_BME680 namespace Jonathan Cameron
2022-01-31 10:50 ` [PATCH 00/16] 2nd set of IIO export namespaces Andy Shevchenko
2022-02-18 11:39   ` Jonathan Cameron
2022-01-31 10:56 ` Andy Shevchenko

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=20220130205701.334592-3-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=gwendal@chromium.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=paul@crapouillou.net \
    /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.