mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
iio:magnetometer:rm3100: Move exports to IIO_RM3100 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: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Song Qiang <songqiang1304521@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220130205701.334592-13-jic23@kernel.org
This commit is contained in:
parent
c7c848b05f
commit
230ee6c69c
@ -100,7 +100,7 @@ const struct regmap_access_table rm3100_readable_table = {
|
||||
.yes_ranges = rm3100_readable_ranges,
|
||||
.n_yes_ranges = ARRAY_SIZE(rm3100_readable_ranges),
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(rm3100_readable_table);
|
||||
EXPORT_SYMBOL_NS_GPL(rm3100_readable_table, IIO_RM3100);
|
||||
|
||||
static const struct regmap_range rm3100_writable_ranges[] = {
|
||||
regmap_reg_range(RM3100_W_REG_START, RM3100_W_REG_END),
|
||||
@ -110,7 +110,7 @@ const struct regmap_access_table rm3100_writable_table = {
|
||||
.yes_ranges = rm3100_writable_ranges,
|
||||
.n_yes_ranges = ARRAY_SIZE(rm3100_writable_ranges),
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(rm3100_writable_table);
|
||||
EXPORT_SYMBOL_NS_GPL(rm3100_writable_table, IIO_RM3100);
|
||||
|
||||
static const struct regmap_range rm3100_volatile_ranges[] = {
|
||||
regmap_reg_range(RM3100_V_REG_START, RM3100_V_REG_END),
|
||||
@ -120,7 +120,7 @@ const struct regmap_access_table rm3100_volatile_table = {
|
||||
.yes_ranges = rm3100_volatile_ranges,
|
||||
.n_yes_ranges = ARRAY_SIZE(rm3100_volatile_ranges),
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(rm3100_volatile_table);
|
||||
EXPORT_SYMBOL_NS_GPL(rm3100_volatile_table, IIO_RM3100);
|
||||
|
||||
static irqreturn_t rm3100_thread_fn(int irq, void *d)
|
||||
{
|
||||
@ -607,7 +607,7 @@ int rm3100_common_probe(struct device *dev, struct regmap *regmap, int irq)
|
||||
|
||||
return devm_iio_device_register(dev, indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rm3100_common_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(rm3100_common_probe, IIO_RM3100);
|
||||
|
||||
MODULE_AUTHOR("Song Qiang <songqiang1304521@gmail.com>");
|
||||
MODULE_DESCRIPTION("PNI RM3100 3-axis magnetometer i2c driver");
|
||||
|
@ -52,3 +52,4 @@ module_i2c_driver(rm3100_driver);
|
||||
MODULE_AUTHOR("Song Qiang <songqiang1304521@gmail.com>");
|
||||
MODULE_DESCRIPTION("PNI RM3100 3-axis magnetometer i2c driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_RM3100);
|
||||
|
@ -62,3 +62,4 @@ module_spi_driver(rm3100_driver);
|
||||
MODULE_AUTHOR("Song Qiang <songqiang1304521@gmail.com>");
|
||||
MODULE_DESCRIPTION("PNI RM3100 3-axis magnetometer spi driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_RM3100);
|
||||
|
Loading…
Reference in New Issue
Block a user