hwmon: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:

committed by
Guenter Roeck

parent
f58876ac8c
commit
a8b3a3a53f
@@ -424,7 +424,7 @@ static int ntc_thermistor_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(pdata))
|
||||
return PTR_ERR(pdata);
|
||||
else if (pdata == NULL)
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
|
||||
if (!pdata) {
|
||||
dev_err(&pdev->dev, "No platform init data supplied.\n");
|
||||
|
Reference in New Issue
Block a user