Additional thermal control update for 6.6-rc1
Eliminate an obsolete thermal zone registration function. -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmT7ciwSHHJqd0Byand5 c29ja2kubmV0AAoJEILEb/54YlRx7t4P/2inGJikCy2sjJTkQanu9+PBk4IDQDHD lrAQaSk9Ux+8epKq7AwlPmwDUuGJOetUQUbftBmTv6BS0AJuXTz5Wqcb/OCzteqv 9FbucDj09A5Vz4+KSAsu4Mt+lj4ziLlbkhlhU+pd4WPQQjrYBh7kyh3X2bPV8RoQ DCNKryLM2P+p2oswbIVnTB3zf29lyLFAUXPuKRvBqlFqTCTpjo4lEn9SCuwYSfo0 UiyFWnlVjgBh5r9pFu/5iYSnbrBCcbpt0BJfuZMXiJt4HhiX8iNyrbvdGexQr2g3 2hwD59R3ImK8ARl7EMH+nxDiDShAINrEkDSRG5a8nvHVJ56u1X7m4YTOH9Bomc45 hD1shf+0M5W29FCZkaw1FF3KkiuTIKEFTJIf1kvIf4XLKYgvkkDAIj1BlGRd07PR EtKKR0W+FJWUUkEMA9eJJ/DoVxq+m6QWaGtvPb0/XQw/plITy5+HcjSmzUcP/4AM MPIQXHO7dhhA9nJ3z6lrnqfhUegdetfpif5xm6TAh8mYGM6dYGFjpMcjrLYO6Nbg eGCcqTfvocLg5Rt9fdgWYDtmIGUbmQqYUna6lHo86rQF4BaWz8DFCIRmCefQPirs CBCA+n/k9M9U5jTE+k8HxYTvpIgtIeHc1HWygF3+UxMGVn0vFLynbzKz6jGnWl85 GwnZIh8prUSK =MWTQ -----END PGP SIGNATURE----- Merge tag 'thermal-6.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more thermal control updates from Rafael Wysocki: "Eliminate an obsolete thermal zone registration function" * tag 'thermal-6.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: core: Drop thermal_zone_device_register() thermal: Use thermal_tripless_zone_device_register() thermal: core: Add function for registering tripless thermal zones thermal: core: Clean up headers of thermal zone registration functions
This commit is contained in:
commit
32bf43e4ef
@ -1309,8 +1309,8 @@ static int psy_register_thermal(struct power_supply *psy)
|
||||
struct thermal_zone_params tzp = {
|
||||
.no_hwmon = IS_ENABLED(CONFIG_POWER_SUPPLY_HWMON)
|
||||
};
|
||||
psy->tzd = thermal_zone_device_register(psy->desc->name,
|
||||
0, 0, psy, &psy_tzd_ops, &tzp, 0, 0);
|
||||
psy->tzd = thermal_tripless_zone_device_register(psy->desc->name,
|
||||
psy, &psy_tzd_ops, &tzp);
|
||||
if (IS_ERR(psy->tzd))
|
||||
return PTR_ERR(psy->tzd);
|
||||
ret = thermal_zone_device_enable(psy->tzd);
|
||||
|
@ -876,8 +876,9 @@ static int armada_thermal_probe(struct platform_device *pdev)
|
||||
/* Wait the sensors to be valid */
|
||||
armada_wait_sensor_validity(priv);
|
||||
|
||||
tz = thermal_zone_device_register(priv->zone_name, 0, 0, priv,
|
||||
&legacy_ops, NULL, 0, 0);
|
||||
tz = thermal_tripless_zone_device_register(priv->zone_name,
|
||||
priv, &legacy_ops,
|
||||
NULL);
|
||||
if (IS_ERR(tz)) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to register thermal zone device\n");
|
||||
|
@ -139,8 +139,8 @@ static int dove_thermal_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
thermal = thermal_zone_device_register("dove_thermal", 0, 0,
|
||||
priv, &ops, NULL, 0, 0);
|
||||
thermal = thermal_tripless_zone_device_register("dove_thermal", priv,
|
||||
&ops, NULL);
|
||||
if (IS_ERR(thermal)) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to register thermal zone device\n");
|
||||
|
@ -609,9 +609,9 @@ static int int3400_thermal_probe(struct platform_device *pdev)
|
||||
|
||||
evaluate_odvp(priv);
|
||||
|
||||
priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
|
||||
priv, &int3400_thermal_ops,
|
||||
&int3400_thermal_params, 0, 0);
|
||||
priv->thermal = thermal_tripless_zone_device_register("INT3400 Thermal", priv,
|
||||
&int3400_thermal_ops,
|
||||
&int3400_thermal_params);
|
||||
if (IS_ERR(priv->thermal)) {
|
||||
result = PTR_ERR(priv->thermal);
|
||||
goto free_art_trt;
|
||||
|
@ -71,8 +71,8 @@ static int kirkwood_thermal_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(priv->sensor))
|
||||
return PTR_ERR(priv->sensor);
|
||||
|
||||
thermal = thermal_zone_device_register("kirkwood_thermal", 0, 0,
|
||||
priv, &ops, NULL, 0, 0);
|
||||
thermal = thermal_tripless_zone_device_register("kirkwood_thermal",
|
||||
priv, &ops, NULL);
|
||||
if (IS_ERR(thermal)) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to register thermal zone device\n");
|
||||
|
@ -122,8 +122,8 @@ static int spear_thermal_probe(struct platform_device *pdev)
|
||||
stdev->flags = val;
|
||||
writel_relaxed(stdev->flags, stdev->thermal_base);
|
||||
|
||||
spear_thermal = thermal_zone_device_register("spear_thermal", 0, 0,
|
||||
stdev, &ops, NULL, 0, 0);
|
||||
spear_thermal = thermal_tripless_zone_device_register("spear_thermal",
|
||||
stdev, &ops, NULL);
|
||||
if (IS_ERR(spear_thermal)) {
|
||||
dev_err(&pdev->dev, "thermal zone device is NULL\n");
|
||||
ret = PTR_ERR(spear_thermal);
|
||||
|
@ -1389,16 +1389,16 @@ free_tz:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(thermal_zone_device_register_with_trips);
|
||||
|
||||
struct thermal_zone_device *thermal_zone_device_register(const char *type, int ntrips, int mask,
|
||||
void *devdata, struct thermal_zone_device_ops *ops,
|
||||
const struct thermal_zone_params *tzp, int passive_delay,
|
||||
int polling_delay)
|
||||
struct thermal_zone_device *thermal_tripless_zone_device_register(
|
||||
const char *type,
|
||||
void *devdata,
|
||||
struct thermal_zone_device_ops *ops,
|
||||
const struct thermal_zone_params *tzp)
|
||||
{
|
||||
return thermal_zone_device_register_with_trips(type, NULL, ntrips, mask,
|
||||
devdata, ops, tzp,
|
||||
passive_delay, polling_delay);
|
||||
return thermal_zone_device_register_with_trips(type, NULL, 0, 0, devdata,
|
||||
ops, tzp, 0, 0);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(thermal_zone_device_register);
|
||||
EXPORT_SYMBOL_GPL(thermal_tripless_zone_device_register);
|
||||
|
||||
void *thermal_zone_device_priv(struct thermal_zone_device *tzd)
|
||||
{
|
||||
|
@ -300,16 +300,22 @@ int thermal_acpi_critical_trip_temp(struct acpi_device *adev, int *ret_temp);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_THERMAL
|
||||
struct thermal_zone_device *thermal_zone_device_register(const char *, int, int,
|
||||
void *, struct thermal_zone_device_ops *,
|
||||
const struct thermal_zone_params *, int, int);
|
||||
struct thermal_zone_device *thermal_zone_device_register_with_trips(
|
||||
const char *type,
|
||||
struct thermal_trip *trips,
|
||||
int num_trips, int mask,
|
||||
void *devdata,
|
||||
struct thermal_zone_device_ops *ops,
|
||||
const struct thermal_zone_params *tzp,
|
||||
int passive_delay, int polling_delay);
|
||||
|
||||
void thermal_zone_device_unregister(struct thermal_zone_device *);
|
||||
struct thermal_zone_device *thermal_tripless_zone_device_register(
|
||||
const char *type,
|
||||
void *devdata,
|
||||
struct thermal_zone_device_ops *ops,
|
||||
const struct thermal_zone_params *tzp);
|
||||
|
||||
struct thermal_zone_device *
|
||||
thermal_zone_device_register_with_trips(const char *, struct thermal_trip *, int, int,
|
||||
void *, struct thermal_zone_device_ops *,
|
||||
const struct thermal_zone_params *, int, int);
|
||||
void thermal_zone_device_unregister(struct thermal_zone_device *tz);
|
||||
|
||||
void *thermal_zone_device_priv(struct thermal_zone_device *tzd);
|
||||
const char *thermal_zone_device_type(struct thermal_zone_device *tzd);
|
||||
@ -350,15 +356,26 @@ int thermal_zone_device_enable(struct thermal_zone_device *tz);
|
||||
int thermal_zone_device_disable(struct thermal_zone_device *tz);
|
||||
void thermal_zone_device_critical(struct thermal_zone_device *tz);
|
||||
#else
|
||||
static inline struct thermal_zone_device *thermal_zone_device_register(
|
||||
const char *type, int trips, int mask, void *devdata,
|
||||
struct thermal_zone_device_ops *ops,
|
||||
const struct thermal_zone_params *tzp,
|
||||
int passive_delay, int polling_delay)
|
||||
static inline struct thermal_zone_device *thermal_zone_device_register_with_trips(
|
||||
const char *type,
|
||||
struct thermal_trip *trips,
|
||||
int num_trips, int mask,
|
||||
void *devdata,
|
||||
struct thermal_zone_device_ops *ops,
|
||||
const struct thermal_zone_params *tzp,
|
||||
int passive_delay, int polling_delay)
|
||||
{ return ERR_PTR(-ENODEV); }
|
||||
static inline void thermal_zone_device_unregister(
|
||||
struct thermal_zone_device *tz)
|
||||
|
||||
static inline struct thermal_zone_device *thermal_tripless_zone_device_register(
|
||||
const char *type,
|
||||
void *devdata,
|
||||
struct thermal_zone_device_ops *ops,
|
||||
const struct thermal_zone_params *tzp)
|
||||
{ return ERR_PTR(-ENODEV); }
|
||||
|
||||
static inline void thermal_zone_device_unregister(struct thermal_zone_device *tz)
|
||||
{ }
|
||||
|
||||
static inline struct thermal_cooling_device *
|
||||
thermal_cooling_device_register(const char *type, void *devdata,
|
||||
const struct thermal_cooling_device_ops *ops)
|
||||
|
Loading…
x
Reference in New Issue
Block a user