--- zzzz-none-000/linux-3.10.107/drivers/hwmon/max197.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/hwmon/max197.c 2021-02-04 17:41:59.000000000 +0000 @@ -261,7 +261,7 @@ { int ch, ret; struct max197_data *data; - struct max197_platform_data *pdata = pdev->dev.platform_data; + struct max197_platform_data *pdata = dev_get_platdata(&pdev->dev); enum max197_chips chip = platform_get_device_id(pdev)->driver_data; if (pdata == NULL) { @@ -275,10 +275,8 @@ } data = devm_kzalloc(&pdev->dev, sizeof(struct max197_data), GFP_KERNEL); - if (!data) { - dev_err(&pdev->dev, "devm_kzalloc failed\n"); + if (!data) return -ENOMEM; - } data->pdata = pdata; mutex_init(&data->lock); @@ -326,7 +324,7 @@ return 0; } -static struct platform_device_id max197_device_ids[] = { +static const struct platform_device_id max197_device_ids[] = { { "max197", max197 }, { "max199", max199 }, { } @@ -336,7 +334,6 @@ static struct platform_driver max197_driver = { .driver = { .name = "max197", - .owner = THIS_MODULE, }, .probe = max197_probe, .remove = max197_remove,