--- zzzz-none-000/linux-3.10.107/drivers/hwmon/pc87360.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/hwmon/pc87360.c 2021-02-04 17:41:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * pc87360.c - Part of lm_sensors, Linux kernel modules * for hardware monitoring - * Copyright (C) 2004, 2007 Jean Delvare + * Copyright (C) 2004, 2007 Jean Delvare * * Copied from smsc47m1.c: * Copyright (C) 2002 Mark D. Studebaker @@ -244,7 +244,6 @@ static struct platform_driver pc87360_driver = { .driver = { - .owner = THIS_MODULE, .name = "pc87360", }, .probe = pc87360_probe, @@ -615,6 +614,9 @@ if (err) return err; + if (val > 255) + return -EINVAL; + data->vrm = val; return count; } @@ -1225,7 +1227,7 @@ int i; struct pc87360_data *data; int err = 0; - const char *name = "pc87360"; + const char *name; int use_thermistors = 0; struct device *dev = &pdev->dev; @@ -1233,13 +1235,14 @@ if (!data) return -ENOMEM; - data->fannr = 2; - data->innr = 0; - data->tempnr = 0; - switch (devid) { + default: + name = "pc87360"; + data->fannr = 2; + break; case 0xe8: name = "pc87363"; + data->fannr = 2; break; case 0xe4: name = "pc87364"; @@ -1260,7 +1263,6 @@ } data->name = name; - data->valid = 0; mutex_init(&data->lock); mutex_init(&data->update_lock); platform_set_drvdata(pdev, data); @@ -1808,7 +1810,7 @@ } -MODULE_AUTHOR("Jean Delvare "); +MODULE_AUTHOR("Jean Delvare "); MODULE_DESCRIPTION("PC8736x hardware monitor"); MODULE_LICENSE("GPL");