Re: [PATCH 2/6] hwmon: (max6697) Drop platform data support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 22, 2024 at 05:52:00PM -0700, Guenter Roeck wrote:
> +static int max6697_config_of(struct max6697_data *data, struct i2c_client *client)
>  {
[...]
> -	pdata->smbus_timeout_disable =
> -		of_property_read_bool(node, "smbus-timeout-disable");
> -	pdata->extended_range_enable =
> -		of_property_read_bool(node, "extended-range-enable");
> -	pdata->beta_compensation =
> -		of_property_read_bool(node, "beta-compensation-enable");
> +	confreg = 0;
> +	if (of_property_read_bool(node, "smbus-timeout-disable") &&
> +	    (data->chip->valid_conf & MAX6697_CONF_TIMEOUT)) {

s/data->chip/chip/.

> +	if (data->type == max6581) {

Should be `data->type != max6581`.




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux