summaryrefslogtreecommitdiff
path: root/drivers/iio/magnetometer/bmc150_magn.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2022-01-30 20:56:58 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-02-18 11:42:27 +0000
commit47d6cae0d0ea7477b5ea5f43a5b9be759052566b (patch)
treec547f7ced4b6bd2227fe0f61108ca141c405ce29 /drivers/iio/magnetometer/bmc150_magn.c
parent230ee6c69c8948e8d997a76daf7a1aa403fc6d5a (diff)
iio:magnetometer:bmc150: Move exports to IIO_BMC150_MAGN 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. Note the MAGN postfix here is reflecting that this driver is only responsible for part of the BMC150 device. For more information see https://lwn.net/Articles/760045/ Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220130205701.334592-14-jic23@kernel.org
Diffstat (limited to 'drivers/iio/magnetometer/bmc150_magn.c')
-rw-r--r--drivers/iio/magnetometer/bmc150_magn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c
index f96f53175349..85f8bbf4b793 100644
--- a/drivers/iio/magnetometer/bmc150_magn.c
+++ b/drivers/iio/magnetometer/bmc150_magn.c
@@ -226,7 +226,7 @@ const struct regmap_config bmc150_magn_regmap_config = {
.writeable_reg = bmc150_magn_is_writeable_reg,
.volatile_reg = bmc150_magn_is_volatile_reg,
};
-EXPORT_SYMBOL(bmc150_magn_regmap_config);
+EXPORT_SYMBOL_NS(bmc150_magn_regmap_config, IIO_BMC150_MAGN);
static int bmc150_magn_set_power_mode(struct bmc150_magn_data *data,
enum bmc150_magn_power_modes mode,
@@ -982,7 +982,7 @@ err_poweroff:
bmc150_magn_set_power_mode(data, BMC150_MAGN_POWER_MODE_SUSPEND, true);
return ret;
}
-EXPORT_SYMBOL(bmc150_magn_probe);
+EXPORT_SYMBOL_NS(bmc150_magn_probe, IIO_BMC150_MAGN);
int bmc150_magn_remove(struct device *dev)
{
@@ -1009,7 +1009,7 @@ int bmc150_magn_remove(struct device *dev)
regulator_bulk_disable(ARRAY_SIZE(data->regulators), data->regulators);
return 0;
}
-EXPORT_SYMBOL(bmc150_magn_remove);
+EXPORT_SYMBOL_NS(bmc150_magn_remove, IIO_BMC150_MAGN);
#ifdef CONFIG_PM
static int bmc150_magn_runtime_suspend(struct device *dev)
@@ -1077,7 +1077,7 @@ const struct dev_pm_ops bmc150_magn_pm_ops = {
SET_RUNTIME_PM_OPS(bmc150_magn_runtime_suspend,
bmc150_magn_runtime_resume, NULL)
};
-EXPORT_SYMBOL(bmc150_magn_pm_ops);
+EXPORT_SYMBOL_NS(bmc150_magn_pm_ops, IIO_BMC150_MAGN);
MODULE_AUTHOR("Irina Tirdea <irina.tirdea@intel.com>");
MODULE_LICENSE("GPL v2");