Commit 26b74d85 authored by Jonathan Cameron's avatar Jonathan Cameron

iio:accel:bmc150: Move exports into IIO_BMC150 namespace

To avoid unnecessary pollution of the global symbol namespace move the
driver core exports into their own namespace and import that into the two
bus modules.

For more info see https://lwn.net/Articles/760045/Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20220116180535.2367780-10-jic23@kernel.org
parent 489c75af
...@@ -203,7 +203,7 @@ const struct regmap_config bmc150_regmap_conf = { ...@@ -203,7 +203,7 @@ const struct regmap_config bmc150_regmap_conf = {
.val_bits = 8, .val_bits = 8,
.max_register = 0x3f, .max_register = 0x3f,
}; };
EXPORT_SYMBOL_GPL(bmc150_regmap_conf); EXPORT_SYMBOL_NS_GPL(bmc150_regmap_conf, IIO_BMC150);
static int bmc150_accel_set_mode(struct bmc150_accel_data *data, static int bmc150_accel_set_mode(struct bmc150_accel_data *data,
enum bmc150_power_modes mode, enum bmc150_power_modes mode,
...@@ -1798,7 +1798,7 @@ int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq, ...@@ -1798,7 +1798,7 @@ int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq,
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(bmc150_accel_core_probe); EXPORT_SYMBOL_NS_GPL(bmc150_accel_core_probe, IIO_BMC150);
void bmc150_accel_core_remove(struct device *dev) void bmc150_accel_core_remove(struct device *dev)
{ {
...@@ -1821,7 +1821,7 @@ void bmc150_accel_core_remove(struct device *dev) ...@@ -1821,7 +1821,7 @@ void bmc150_accel_core_remove(struct device *dev)
regulator_bulk_disable(ARRAY_SIZE(data->regulators), regulator_bulk_disable(ARRAY_SIZE(data->regulators),
data->regulators); data->regulators);
} }
EXPORT_SYMBOL_GPL(bmc150_accel_core_remove); EXPORT_SYMBOL_NS_GPL(bmc150_accel_core_remove, IIO_BMC150);
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int bmc150_accel_suspend(struct device *dev) static int bmc150_accel_suspend(struct device *dev)
...@@ -1896,7 +1896,7 @@ const struct dev_pm_ops bmc150_accel_pm_ops = { ...@@ -1896,7 +1896,7 @@ const struct dev_pm_ops bmc150_accel_pm_ops = {
SET_RUNTIME_PM_OPS(bmc150_accel_runtime_suspend, SET_RUNTIME_PM_OPS(bmc150_accel_runtime_suspend,
bmc150_accel_runtime_resume, NULL) bmc150_accel_runtime_resume, NULL)
}; };
EXPORT_SYMBOL_GPL(bmc150_accel_pm_ops); EXPORT_SYMBOL_NS_GPL(bmc150_accel_pm_ops, IIO_BMC150);
MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>"); MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
......
...@@ -280,3 +280,4 @@ module_i2c_driver(bmc150_accel_driver); ...@@ -280,3 +280,4 @@ module_i2c_driver(bmc150_accel_driver);
MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>"); MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("BMC150 I2C accelerometer driver"); MODULE_DESCRIPTION("BMC150 I2C accelerometer driver");
MODULE_IMPORT_NS(IIO_BMC150);
...@@ -84,3 +84,4 @@ module_spi_driver(bmc150_accel_driver); ...@@ -84,3 +84,4 @@ module_spi_driver(bmc150_accel_driver);
MODULE_AUTHOR("Markus Pargmann <mpa@pengutronix.de>"); MODULE_AUTHOR("Markus Pargmann <mpa@pengutronix.de>");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("BMC150 SPI accelerometer driver"); MODULE_DESCRIPTION("BMC150 SPI accelerometer driver");
MODULE_IMPORT_NS(IIO_BMC150);
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