Attempt fix for Zenith Extreme
This commit is contained in:
parent
587da847d1
commit
0398359cb3
2
Makefile
2
Makefile
|
@ -65,7 +65,7 @@ endif
|
||||||
all: modules
|
all: modules
|
||||||
|
|
||||||
# Targets for running make directly in the external module directory:
|
# Targets for running make directly in the external module directory:
|
||||||
|
# Add -g -DDEBUG to build a debug module
|
||||||
ASUS_WMI_SENSORS_CFLAGS=-DASUS_WMI_SENSORS_DRIVER_VERSION='\"$(DRIVER_VERSION)\"'
|
ASUS_WMI_SENSORS_CFLAGS=-DASUS_WMI_SENSORS_DRIVER_VERSION='\"$(DRIVER_VERSION)\"'
|
||||||
|
|
||||||
modules:
|
modules:
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
MODULE_AUTHOR("Ed Brindley <kernel@maidavale.org>");
|
MODULE_AUTHOR("Ed Brindley <kernel@maidavale.org>");
|
||||||
MODULE_DESCRIPTION("Asus WMI Sensors Driver");
|
MODULE_DESCRIPTION("Asus WMI Sensors Driver");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_VERSION("2");
|
MODULE_VERSION("3");
|
||||||
|
|
||||||
#define ASUS_HW_GUID "466747A0-70EC-11DE-8A39-0800200C9A66"
|
#define ASUS_HW_GUID "466747A0-70EC-11DE-8A39-0800200C9A66"
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ enum asus_wmi_sensor_class {
|
||||||
FAN_RPM = 0x2,
|
FAN_RPM = 0x2,
|
||||||
CURRENT = 0x3,
|
CURRENT = 0x3,
|
||||||
WATER_FLOW = 0x4,
|
WATER_FLOW = 0x4,
|
||||||
|
BOOL = 0x5 //TODO
|
||||||
};
|
};
|
||||||
|
|
||||||
enum asus_wmi_location {
|
enum asus_wmi_location {
|
||||||
|
@ -64,7 +65,8 @@ enum asus_wmi_location {
|
||||||
enum asus_wmi_type {
|
enum asus_wmi_type {
|
||||||
SIGNED_INT = 0x0,
|
SIGNED_INT = 0x0,
|
||||||
UNSIGNED_INT = 0x1,
|
UNSIGNED_INT = 0x1,
|
||||||
SCALED = 0x3
|
BOOL = 0x2, //TODO
|
||||||
|
SCALED = 0x3,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum asus_wmi_source {
|
enum asus_wmi_source {
|
||||||
|
@ -267,7 +269,7 @@ static void update_values_for_source(u8 source, struct asus_wmi_sensors *asus_wm
|
||||||
|
|
||||||
for (i = 0; i < asus_wmi_sensors->sensor_count;i++) {
|
for (i = 0; i < asus_wmi_sensors->sensor_count;i++) {
|
||||||
sensor = asus_wmi_sensors->info_by_id[i];
|
sensor = asus_wmi_sensors->info_by_id[i];
|
||||||
if(sensor->source == source) {
|
if(sensor && sensor->source == source) {
|
||||||
ret = get_sensor_value(sensor->id, &value);
|
ret = get_sensor_value(sensor->id, &value);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
sensor->cached_value = value;
|
sensor->cached_value = value;
|
||||||
|
@ -463,6 +465,7 @@ static int configure_sensor_setup(struct asus_wmi_sensors *asus_wmi_sensors)
|
||||||
|
|
||||||
asus_wmi_sensors->info_by_id =
|
asus_wmi_sensors->info_by_id =
|
||||||
devm_kcalloc(dev, nr_sensors, sizeof(*asus_wmi_sensors->info_by_id), GFP_KERNEL);
|
devm_kcalloc(dev, nr_sensors, sizeof(*asus_wmi_sensors->info_by_id), GFP_KERNEL);
|
||||||
|
|
||||||
if (!asus_wmi_sensors->info_by_id)
|
if (!asus_wmi_sensors->info_by_id)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue