Re: [RESEND PATCH v3 2/2] thermal: core: introduce thermal zone device mode control

From: Andy Shevchenko
Date: Mon Feb 26 2018 - 09:48:31 EST


On Mon, Feb 26, 2018 at 4:41 PM, Enric Balletbo i Serra
<enric.balletbo@xxxxxxxxxxxxx> wrote:

> --- a/drivers/thermal/thermal_sysfs.c
> +++ b/drivers/thermal/thermal_sysfs.c

> if (!strncmp(buf, "enabled", sizeof("enabled") - 1))
> - result = tz->ops->set_mode(tz, THERMAL_DEVICE_ENABLED);
> + mode = THERMAL_DEVICE_ENABLED;
> else if (!strncmp(buf, "disabled", sizeof("disabled") - 1))
> - result = tz->ops->set_mode(tz, THERMAL_DEVICE_DISABLED);
> + mode = THERMAL_DEVICE_DISABLED;
> else
> - result = -EINVAL;
> + return -EINVAL;

sysfs_match_string()?


--
With Best Regards,
Andy Shevchenko