--- zzzz-none-000/linux-3.10.107/drivers/hwmon/s3c-hwmon.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/hwmon/s3c-hwmon.c 2021-02-04 17:41:59.000000000 +0000 @@ -165,7 +165,7 @@ { struct sensor_device_attribute *sen_attr = to_sensor_dev_attr(attr); struct s3c_hwmon *hwmon = platform_get_drvdata(to_platform_device(dev)); - struct s3c_hwmon_pdata *pdata = dev->platform_data; + struct s3c_hwmon_pdata *pdata = dev_get_platdata(dev); struct s3c_hwmon_chcfg *cfg; int ret; @@ -194,7 +194,7 @@ char *buf) { struct sensor_device_attribute *sen_attr = to_sensor_dev_attr(attr); - struct s3c_hwmon_pdata *pdata = dev->platform_data; + struct s3c_hwmon_pdata *pdata = dev_get_platdata(dev); struct s3c_hwmon_chcfg *cfg; cfg = pdata->in[sen_attr->index]; @@ -274,7 +274,7 @@ */ static int s3c_hwmon_probe(struct platform_device *dev) { - struct s3c_hwmon_pdata *pdata = dev->dev.platform_data; + struct s3c_hwmon_pdata *pdata = dev_get_platdata(&dev->dev); struct s3c_hwmon *hwmon; int ret = 0; int i; @@ -285,10 +285,8 @@ } hwmon = devm_kzalloc(&dev->dev, sizeof(struct s3c_hwmon), GFP_KERNEL); - if (hwmon == NULL) { - dev_err(&dev->dev, "no memory\n"); + if (hwmon == NULL) return -ENOMEM; - } platform_set_drvdata(dev, hwmon); @@ -380,7 +378,6 @@ static struct platform_driver s3c_hwmon_driver = { .driver = { .name = "s3c-hwmon", - .owner = THIS_MODULE, }, .probe = s3c_hwmon_probe, .remove = s3c_hwmon_remove,