v5 of the patch as sent to LKML

This commit is contained in:
ed 2021-10-12 14:10:12 +01:00
parent 3eeb3fe091
commit 9313d1051b
1 changed files with 5 additions and 4 deletions

View File

@ -176,6 +176,7 @@ struct asus_wmi_sensors {
*/
static int asus_wmi_call_method(u32 method_id, u32 *args, struct acpi_buffer *output)
{
#if IS_ENABLED(CONFIG_ACPI_WMI)
struct acpi_buffer input = {(acpi_size) sizeof(*args), args };
acpi_status status;
@ -184,6 +185,9 @@ static int asus_wmi_call_method(u32 method_id, u32 *args, struct acpi_buffer *ou
return -EIO;
return 0;
#else
return -EOPNOTSUPP;
#endif
}
/*
@ -436,7 +440,7 @@ static umode_t asus_wmi_hwmon_is_visible(const void *drvdata,
const struct asus_wmi_sensors *sensor_data = drvdata;
sensor = *(sensor_data->wmi.info[type] + channel);
if (sensor && sensor->name)
if (sensor)
return 0444;
return 0;
@ -577,9 +581,6 @@ static int asus_wmi_probe(struct wmi_device *wdev, const void *context)
if (!sensor_data)
return -ENOMEM;
if (!wmi_has_guid(ASUSWMI_MONITORING_GUID))
return -ENODEV;
if (asus_wmi_get_version(&version))
return -ENODEV;