Skip to contentSkip to conversation

iio: adc: qcom-vadc: add missing MODULE_DESCRIPTION/LICENSE

PATCH In review Jesse Chan 2 participants 2 messages Nov 20, 2017 – Nov 25, 2017

Subsystems (2)
lore
Share & tools
lore

Jesse Chan

author
#0 lore raw

PATCH 1/1 iio: adc: qcom-vadc: add missing MODULE_DESCRIPTION/LICENSE

This change resolves a new compile-time warning
when built as a loadable module:

WARNING: modpost: missing MODULE_LICENSE() in drivers/iio/adc/qcom-vadc-common.o see include/linux/module.h for more information

This adds the license as "GPL v2", which matches the header of the file.

MODULE_DESCRIPTION is also added.

---
 drivers/iio/adc/qcom-pm8xxx-xoadc.c | 1 -
 drivers/iio/adc/qcom-spmi-vadc.c    | 1 -
 drivers/iio/adc/qcom-vadc-common.c  | 3 +++
 drivers/iio/adc/qcom-vadc-common.h  | 2 ++
 4 files changed, 5 insertions(+), 2 deletions(-)
drivers/iio/adc/qcom-pm8xxx-xoadc.c +0 -1
index b093ecddf1a8..e7ba66798362 100644
@@ -11,7 +11,6 @@
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
drivers/iio/adc/qcom-spmi-vadc.c +0 -1
index 3680e0d47412..569f88ce9385 100644
@@ -19,7 +19,6 @@
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/math64.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
drivers/iio/adc/qcom-vadc-common.c +3 -0
index 47d24ae5462f..8078a0cbdc46 100644
@@ -229,3 +229,6 @@ int qcom_vadc_decimation_from_dt(u32 value)
 	return __ffs64(value / VADC_DECIMATION_MIN);
 }
 EXPORT_SYMBOL(qcom_vadc_decimation_from_dt);
+
+MODULE_DESCRIPTION("Qualcomm voltage ADC driver");
+MODULE_LICENSE("GPL v2");
drivers/iio/adc/qcom-vadc-common.h +2 -0
index 1d5354ff5c72..c62500147bb1 100644
@@ -6,6 +6,8 @@
 #ifndef QCOM_VADC_COMMON_H
 #define QCOM_VADC_COMMON_H
 
+#include <linux/module.h>
+
 #define VADC_CONV_TIME_MIN_US			2000
 #define VADC_CONV_TIME_MAX_US			2100
 
Signature · 1 line
2.14.1
maintainer
#1 lore raw
Quoted 11 lines · On Mon, 20 Nov 2017 12:55:51 -0800 Jesse Chan <[email protected]> wrote:

This change resolves a new compile-time warning
when built as a loadable module:

WARNING: modpost: missing MODULE_LICENSE() in drivers/iio/adc/qcom-vadc-common.o see include/linux/module.h for more information

This adds the license as "GPL v2", which matches the header of the file.

MODULE_DESCRIPTION is also added.

Again, already handled by Linus Walleij.

I'm also far from keen on pushing the header include up into the header...

Quoted 55 lines
---
 drivers/iio/adc/qcom-pm8xxx-xoadc.c | 1 -
 drivers/iio/adc/qcom-spmi-vadc.c    | 1 -
 drivers/iio/adc/qcom-vadc-common.c  | 3 +++
 drivers/iio/adc/qcom-vadc-common.h  | 2 ++
 4 files changed, 5 insertions(+), 2 deletions(-)
drivers/iio/adc/qcom-pm8xxx-xoadc.c +0 -1
index b093ecddf1a8..e7ba66798362 100644
@@ -11,7 +11,6 @@
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
drivers/iio/adc/qcom-spmi-vadc.c +0 -1
index 3680e0d47412..569f88ce9385 100644
@@ -19,7 +19,6 @@
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/math64.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
drivers/iio/adc/qcom-vadc-common.c +3 -0
index 47d24ae5462f..8078a0cbdc46 100644
@@ -229,3 +229,6 @@ int qcom_vadc_decimation_from_dt(u32 value)
 	return __ffs64(value / VADC_DECIMATION_MIN);
 }
 EXPORT_SYMBOL(qcom_vadc_decimation_from_dt);
+
+MODULE_DESCRIPTION("Qualcomm voltage ADC driver");
+MODULE_LICENSE("GPL v2");
drivers/iio/adc/qcom-vadc-common.h +2 -0
index 1d5354ff5c72..c62500147bb1 100644
@@ -6,6 +6,8 @@
 #ifndef QCOM_VADC_COMMON_H
 #define QCOM_VADC_COMMON_H
 
+#include <linux/module.h>
+
 #define VADC_CONV_TIME_MIN_US			2000
 #define VADC_CONV_TIME_MAX_US			2100