On 1/21/23 00:57, Frank Crawford wrote:
Add a driver version and log it on load, to make it easier to
distinguish between the in-tree version and any development version from
an external source.
Sorry, no. Name your out of tree version as you want.
Guenter
Signed-off-by: Frank Crawford <frank@xxxxxxxxxxxxxxxxxx>
---
drivers/hwmon/it87.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index a8a6a0ffee82..632ab3d50bc6 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -59,6 +59,8 @@
#include <linux/acpi.h>
#include <linux/io.h>
+#define IT87_DRIVER_VERSION "v1.0-official"
+
#define DRVNAME "it87"
enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8732,
@@ -3398,6 +3400,8 @@ static int __init sm_it87_init(void)
bool found = false;
int i, err;
+ pr_info("it87 driver version %s\n", IT87_DRIVER_VERSION);
+
err = platform_driver_register(&it87_driver);
if (err)
return err;
@@ -3470,6 +3474,7 @@ MODULE_PARM_DESC(fix_pwm_polarity,
"Force PWM polarity to active high (DANGEROUS)");
MODULE_LICENSE("GPL");
+MODULE_VERSION(IT87_DRIVER_VERSION);
module_init(sm_it87_init);
module_exit(sm_it87_exit);