]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - drivers/thermal/qcom-spmi-temp-alarm.c
Merge tag 'mac80211-for-davem-2016-06-29-v2' of git://git.kernel.org/pub/scm/linux...
[mirror_ubuntu-focal-kernel.git] / drivers / thermal / qcom-spmi-temp-alarm.c
index b677aada5b52860948d6731b0c164573aad4b9f9..f8a3c60bef94bcf32ca388ab0c2de8de034dab7c 100644 (file)
@@ -260,7 +260,7 @@ static int qpnp_tm_probe(struct platform_device *pdev)
        if (ret < 0)
                goto fail;
 
-       chip->tz_dev = thermal_zone_of_sensor_register(&pdev->dev, 0, chip,
+       chip->tz_dev = devm_thermal_zone_of_sensor_register(&pdev->dev, 0, chip,
                                                        &qpnp_tm_sensor_ops);
        if (IS_ERR(chip->tz_dev)) {
                dev_err(&pdev->dev, "failed to register sensor\n");
@@ -281,7 +281,6 @@ static int qpnp_tm_remove(struct platform_device *pdev)
 {
        struct qpnp_tm_chip *chip = dev_get_drvdata(&pdev->dev);
 
-       thermal_zone_of_sensor_unregister(&pdev->dev, chip->tz_dev);
        if (!IS_ERR(chip->adc))
                iio_channel_release(chip->adc);