summaryrefslogtreecommitdiffstats
path: root/drivers/iio/humidity/hts221_core.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2022-06-04 17:12:21 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-06-15 22:07:09 +0100
commit1300ab3927184bf871a5c6b3ceb30454a4498800 (patch)
tree25c38d35020a0bd9f7c792a1fd23c5bb65e0fe55 /drivers/iio/humidity/hts221_core.c
parent2129f25de5821677728689cabf01d74bc9c042cc (diff)
downloadlinux-stable-1300ab3927184bf871a5c6b3ceb30454a4498800.tar.gz
linux-stable-1300ab3927184bf871a5c6b3ceb30454a4498800.tar.bz2
linux-stable-1300ab3927184bf871a5c6b3ceb30454a4498800.zip
iio: humidity: hts221: Move symbol exports into IIO_HTS221 namespace
Avoid unnecessary pollution of the global symbol namespace by moving library functions in to a specific namespace and import that into the drivers that make use of the functions. For more info: https://lwn.net/Articles/760045/ Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/20220220181522.541718-7-jic23@kernel.org Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/20220604161223.461847-4-jic23@kernel.org
Diffstat (limited to 'drivers/iio/humidity/hts221_core.c')
-rw-r--r--drivers/iio/humidity/hts221_core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/humidity/hts221_core.c b/drivers/iio/humidity/hts221_core.c
index da9c08432ef2..517158307d8c 100644
--- a/drivers/iio/humidity/hts221_core.c
+++ b/drivers/iio/humidity/hts221_core.c
@@ -668,7 +668,7 @@ int hts221_probe(struct device *dev, int irq, const char *name,
return devm_iio_device_register(hw->dev, iio_dev);
}
-EXPORT_SYMBOL(hts221_probe);
+EXPORT_SYMBOL_NS(hts221_probe, IIO_HTS221);
static int hts221_suspend(struct device *dev)
{
@@ -694,7 +694,8 @@ static int hts221_resume(struct device *dev)
return err;
}
-EXPORT_SIMPLE_DEV_PM_OPS(hts221_pm_ops, hts221_suspend, hts221_resume);
+EXPORT_NS_SIMPLE_DEV_PM_OPS(hts221_pm_ops, hts221_suspend, hts221_resume,
+ IIO_HTS221);
MODULE_AUTHOR("Lorenzo Bianconi <lorenzo.bianconi@st.com>");
MODULE_DESCRIPTION("STMicroelectronics hts221 sensor driver");