Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: chemical: sps30: Move symbol exports into IIO_SPS30 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: Tomasz Duszynski <tomasz.duszynski@octakon.com>
Link: https://lore.kernel.org/r/20220220173701.502331-4-jic23@kernel.org
Reviewed-By: Joe Simmons-Talbott <joetalbott@gmail.com>
Link: https://lore.kernel.org/r/20220604155306.422937-4-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

+3 -1
+1 -1
drivers/iio/chemical/sps30.c
··· 372 372 373 373 return devm_iio_device_register(dev, indio_dev); 374 374 } 375 - EXPORT_SYMBOL_GPL(sps30_probe); 375 + EXPORT_SYMBOL_NS_GPL(sps30_probe, IIO_SPS30); 376 376 377 377 MODULE_AUTHOR("Tomasz Duszynski <tduszyns@gmail.com>"); 378 378 MODULE_DESCRIPTION("Sensirion SPS30 particulate matter sensor driver");
+1
drivers/iio/chemical/sps30_i2c.c
··· 256 256 MODULE_AUTHOR("Tomasz Duszynski <tomasz.duszynski@octakon.com>"); 257 257 MODULE_DESCRIPTION("Sensirion SPS30 particulate matter sensor i2c driver"); 258 258 MODULE_LICENSE("GPL v2"); 259 + MODULE_IMPORT_NS(IIO_SPS30);
+1
drivers/iio/chemical/sps30_serial.c
··· 429 429 MODULE_AUTHOR("Tomasz Duszynski <tomasz.duszynski@octakon.com>"); 430 430 MODULE_DESCRIPTION("Sensirion SPS30 particulate matter sensor serial driver"); 431 431 MODULE_LICENSE("GPL v2"); 432 + MODULE_IMPORT_NS(IIO_SPS30);