projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
thermal
/
dove_thermal.c
diff --git
a/drivers/thermal/dove_thermal.c
b/drivers/thermal/dove_thermal.c
index a088d1365ca5ef287e46db053ba3625b8c536473..828f5e345c303ef9b15662477dfd01d16c8a96f6 100644
(file)
--- a/
drivers/thermal/dove_thermal.c
+++ b/
drivers/thermal/dove_thermal.c
@@
-134,16
+134,11
@@
static int dove_thermal_probe(struct platform_device *pdev)
struct resource *res;
int ret;
struct resource *res;
int ret;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "Failed to get platform resource\n");
- return -ENODEV;
- }
-
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->sensor = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(priv->sensor))
return PTR_ERR(priv->sensor);
priv->sensor = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(priv->sensor))
return PTR_ERR(priv->sensor);
@@
-178,7
+173,6
@@
static int dove_thermal_exit(struct platform_device *pdev)
platform_get_drvdata(pdev);
thermal_zone_device_unregister(dove_thermal);
platform_get_drvdata(pdev);
thermal_zone_device_unregister(dove_thermal);
- platform_set_drvdata(pdev, NULL);
return 0;
}
return 0;
}
@@
-191,7
+185,7
@@
static struct platform_driver dove_thermal_driver = {
.driver = {
.name = "dove_thermal",
.owner = THIS_MODULE,
.driver = {
.name = "dove_thermal",
.owner = THIS_MODULE,
- .of_match_table =
of_match_ptr(dove_thermal_id_table)
,
+ .of_match_table =
dove_thermal_id_table
,
},
};
},
};