--- zzzz-none-000/linux-3.10.107/drivers/hwmon/mcp3021.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/hwmon/mcp3021.c 2021-02-04 17:41:59.000000000 +0000 @@ -131,12 +131,13 @@ break; } - if (client->dev.platform_data) { - data->vdd = *(u32 *)client->dev.platform_data; + if (dev_get_platdata(&client->dev)) { + data->vdd = *(u32 *)dev_get_platdata(&client->dev); if (data->vdd > MCP3021_VDD_MAX || data->vdd < MCP3021_VDD_MIN) return -EINVAL; - } else + } else { data->vdd = MCP3021_VDD_REF; + } err = sysfs_create_file(&client->dev.kobj, &dev_attr_in0_input.attr); if (err)