summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@rjwysocki.net>2023-03-08 16:03:56 +0300
committerRafael J. Wysocki <rjw@rjwysocki.net>2023-03-08 16:03:56 +0300
commit2b6db9efa50799fa75ce609f24b355f29504bd9a (patch)
treebb729b6ff9b79dfa713705f7c801349fc528b5c5 /drivers/acpi
parent52f04f10b9005ac4ce640da14a52ed7a146432fa (diff)
parent20918ccacd06eea4a4ff457bd86cae62859461a2 (diff)
downloadlinux-2b6db9efa50799fa75ce609f24b355f29504bd9a.tar.xz
Merge branch 'thermal-core' into thermal
Merge thermal control updates for 6.4-rc1: - Add a thermal zone 'devdata' accessor and modify several drivers to use it (Daniel Lezcano). - Prevent drivers from using the 'device' internal thermal zone structure field directly (Daniel Lezcano). - Clean up the hwmon thermal driver (Daniel Lezcano). - Add thermal zone id accessor and thermal zone type accessor and prevent drivers from using thermal zone fields directly (Daniel Lezcano). - Clean up the acerhdf and tegra thermal drivers (Daniel Lezcano). * thermal-core: thermal/drivers/acerhdf: Remove pointless governor test thermal/drivers/acerhdf: Make interval setting only at module load time thermal/drivers/tegra: Remove unneeded lock when setting a trip point thermal/hwmon: Use the thermal_core.h header thermal/drivers/da9062: Don't access the thermal zone device fields thermal: Use thermal_zone_device_type() accessor thermal: Add a thermal zone id accessor thermal/drivers/spear: Don't use tz->device but pdev->dev thermal/core: Add thermal_zone_device structure 'type' accessor thermal: Don't use 'device' internal thermal zone structure field thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs() thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs() thermal: Remove debug or error messages in get_temp() ops thermal/core: Show a debug message when get_temp() fails thermal/core: Use the thermal zone 'devdata' accessor in remaining drivers thermal/core: Use the thermal zone 'devdata' accessor in hwmon located drivers thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers thermal/core: Add a thermal zone 'devdata' accessor
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/thermal.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 0b4b844f9d4c..255efa73ed70 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -498,7 +498,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp)
{
- struct acpi_thermal *tz = thermal->devdata;
+ struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
int result;
if (!tz)
@@ -516,7 +516,7 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp)
static int thermal_get_trip_type(struct thermal_zone_device *thermal,
int trip, enum thermal_trip_type *type)
{
- struct acpi_thermal *tz = thermal->devdata;
+ struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
int i;
if (!tz || trip < 0)
@@ -560,7 +560,7 @@ static int thermal_get_trip_type(struct thermal_zone_device *thermal,
static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
int trip, int *temp)
{
- struct acpi_thermal *tz = thermal->devdata;
+ struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
int i;
if (!tz || trip < 0)
@@ -613,7 +613,7 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
static int thermal_get_crit_temp(struct thermal_zone_device *thermal,
int *temperature)
{
- struct acpi_thermal *tz = thermal->devdata;
+ struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
if (tz->trips.critical.flags.valid) {
*temperature = deci_kelvin_to_millicelsius_with_offset(
@@ -628,7 +628,7 @@ static int thermal_get_crit_temp(struct thermal_zone_device *thermal,
static int thermal_get_trend(struct thermal_zone_device *thermal,
int trip, enum thermal_trend *trend)
{
- struct acpi_thermal *tz = thermal->devdata;
+ struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
enum thermal_trip_type type;
int i;
@@ -670,7 +670,7 @@ static int thermal_get_trend(struct thermal_zone_device *thermal,
static void acpi_thermal_zone_device_hot(struct thermal_zone_device *thermal)
{
- struct acpi_thermal *tz = thermal->devdata;
+ struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
dev_name(&tz->device->dev),
@@ -679,7 +679,7 @@ static void acpi_thermal_zone_device_hot(struct thermal_zone_device *thermal)
static void acpi_thermal_zone_device_critical(struct thermal_zone_device *thermal)
{
- struct acpi_thermal *tz = thermal->devdata;
+ struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
dev_name(&tz->device->dev),
@@ -693,7 +693,7 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
bool bind)
{
struct acpi_device *device = cdev->devdata;
- struct acpi_thermal *tz = thermal->devdata;
+ struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
struct acpi_device *dev;
acpi_handle handle;
int i;
@@ -842,7 +842,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
goto acpi_bus_detach;
dev_info(&tz->device->dev, "registered as thermal_zone%d\n",
- tz->thermal_zone->id);
+ thermal_zone_device_id(tz->thermal_zone));
return 0;