Commit 146b43d9 authored by Jonathan Cameron's avatar Jonathan Cameron

iio:chemical:bme680: Move exports to IIO_BME680 namespace

In order to avoid unnecessary pollution of the global symbol namespace
move the common/library functions into a specific namespace and import
that into the bus specific device drivers that use them.

For more information see https://lwn.net/Articles/760045/Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Himanshu Jha <himanshujha199640@gmail.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220130205701.334592-17-jic23@kernel.org
parent cfaa5482
...@@ -81,7 +81,7 @@ const struct regmap_config bme680_regmap_config = { ...@@ -81,7 +81,7 @@ const struct regmap_config bme680_regmap_config = {
.volatile_table = &bme680_volatile_table, .volatile_table = &bme680_volatile_table,
.cache_type = REGCACHE_RBTREE, .cache_type = REGCACHE_RBTREE,
}; };
EXPORT_SYMBOL(bme680_regmap_config); EXPORT_SYMBOL_NS(bme680_regmap_config, IIO_BME680);
static const struct iio_chan_spec bme680_channels[] = { static const struct iio_chan_spec bme680_channels[] = {
{ {
...@@ -957,7 +957,7 @@ int bme680_core_probe(struct device *dev, struct regmap *regmap, ...@@ -957,7 +957,7 @@ int bme680_core_probe(struct device *dev, struct regmap *regmap,
return devm_iio_device_register(dev, indio_dev); return devm_iio_device_register(dev, indio_dev);
} }
EXPORT_SYMBOL_GPL(bme680_core_probe); EXPORT_SYMBOL_NS_GPL(bme680_core_probe, IIO_BME680);
MODULE_AUTHOR("Himanshu Jha <himanshujha199640@gmail.com>"); MODULE_AUTHOR("Himanshu Jha <himanshujha199640@gmail.com>");
MODULE_DESCRIPTION("Bosch BME680 Driver"); MODULE_DESCRIPTION("Bosch BME680 Driver");
......
...@@ -60,3 +60,4 @@ module_i2c_driver(bme680_i2c_driver); ...@@ -60,3 +60,4 @@ module_i2c_driver(bme680_i2c_driver);
MODULE_AUTHOR("Himanshu Jha <himanshujha199640@gmail.com>"); MODULE_AUTHOR("Himanshu Jha <himanshujha199640@gmail.com>");
MODULE_DESCRIPTION("BME680 I2C driver"); MODULE_DESCRIPTION("BME680 I2C driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_BME680);
...@@ -163,3 +163,4 @@ module_spi_driver(bme680_spi_driver); ...@@ -163,3 +163,4 @@ module_spi_driver(bme680_spi_driver);
MODULE_AUTHOR("Himanshu Jha <himanshujha199640@gmail.com>"); MODULE_AUTHOR("Himanshu Jha <himanshujha199640@gmail.com>");
MODULE_DESCRIPTION("Bosch BME680 SPI driver"); MODULE_DESCRIPTION("Bosch BME680 SPI driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(IIO_BME680);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment