Merge tag 'for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power...
[platform/kernel/linux-starfive.git] / drivers / power / supply / power_supply_core.c
index b2504d2..ab986db 100644 (file)
@@ -1274,7 +1274,7 @@ static int power_supply_read_temp(struct thermal_zone_device *tzd,
        int ret;
 
        WARN_ON(tzd == NULL);
-       psy = tzd->devdata;
+       psy = thermal_zone_device_priv(tzd);
        ret = power_supply_get_property(psy, POWER_SUPPLY_PROP_TEMP, &val);
        if (ret)
                return ret;
@@ -1605,7 +1605,7 @@ EXPORT_SYMBOL_GPL(power_supply_get_drvdata);
 
 static int __init power_supply_class_init(void)
 {
-       power_supply_class = class_create(THIS_MODULE, "power_supply");
+       power_supply_class = class_create("power_supply");
 
        if (IS_ERR(power_supply_class))
                return PTR_ERR(power_supply_class);
@@ -1628,4 +1628,3 @@ MODULE_DESCRIPTION("Universal power supply monitor class");
 MODULE_AUTHOR("Ian Molton <spyro@f2s.com>, "
              "Szabolcs Gyurko, "
              "Anton Vorontsov <cbou@mail.ru>");
-MODULE_LICENSE("GPL");