Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio:adc:ad7091r: Move exports into IIO_AD7091R namespace.

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>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220130205701.334592-3-jic23@kernel.org

+3 -2
+2 -2
drivers/iio/adc/ad7091r-base.c
··· 260 260 261 261 return devm_iio_device_register(dev, iio_dev); 262 262 } 263 - EXPORT_SYMBOL_GPL(ad7091r_probe); 263 + EXPORT_SYMBOL_NS_GPL(ad7091r_probe, IIO_AD7091R); 264 264 265 265 static bool ad7091r_writeable_reg(struct device *dev, unsigned int reg) 266 266 { ··· 290 290 .writeable_reg = ad7091r_writeable_reg, 291 291 .volatile_reg = ad7091r_volatile_reg, 292 292 }; 293 - EXPORT_SYMBOL_GPL(ad7091r_regmap_config); 293 + EXPORT_SYMBOL_NS_GPL(ad7091r_regmap_config, IIO_AD7091R); 294 294 295 295 MODULE_AUTHOR("Beniamin Bia <beniamin.bia@analog.com>"); 296 296 MODULE_DESCRIPTION("Analog Devices AD7091Rx multi-channel converters");
+1
drivers/iio/adc/ad7091r5.c
··· 111 111 MODULE_AUTHOR("Beniamin Bia <beniamin.bia@analog.com>"); 112 112 MODULE_DESCRIPTION("Analog Devices AD7091R5 multi-channel ADC driver"); 113 113 MODULE_LICENSE("GPL v2"); 114 + MODULE_IMPORT_NS(IIO_AD7091R);