diff options
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/intel/intel_menlow.c | 8 | ||||
-rw-r--r-- | drivers/thermal/tegra/tegra-bpmp-thermal.c | 15 |
2 files changed, 11 insertions, 12 deletions
diff --git a/drivers/thermal/intel/intel_menlow.c b/drivers/thermal/intel/intel_menlow.c index 101d7e791a13..3f885b08a490 100644 --- a/drivers/thermal/intel/intel_menlow.c +++ b/drivers/thermal/intel/intel_menlow.c @@ -179,22 +179,20 @@ static int intel_menlow_memory_add(struct acpi_device *device) } -static int intel_menlow_memory_remove(struct acpi_device *device) +static void intel_menlow_memory_remove(struct acpi_device *device) { struct thermal_cooling_device *cdev; if (!device) - return -EINVAL; + return; cdev = acpi_driver_data(device); if (!cdev) - return -EINVAL; + return; sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); sysfs_remove_link(&cdev->device.kobj, "device"); thermal_cooling_device_unregister(cdev); - - return 0; } static const struct acpi_device_id intel_menlow_memory_ids[] = { diff --git a/drivers/thermal/tegra/tegra-bpmp-thermal.c b/drivers/thermal/tegra/tegra-bpmp-thermal.c index eb84f0b9dc7c..0b7a1a1948cb 100644 --- a/drivers/thermal/tegra/tegra-bpmp-thermal.c +++ b/drivers/thermal/tegra/tegra-bpmp-thermal.c @@ -106,21 +106,22 @@ static void tz_device_update_work_fn(struct work_struct *work) static void bpmp_mrq_thermal(unsigned int mrq, struct tegra_bpmp_channel *ch, void *data) { - struct mrq_thermal_bpmp_to_host_request *req; + struct mrq_thermal_bpmp_to_host_request req; struct tegra_bpmp_thermal *tegra = data; + size_t offset; int i; - req = (struct mrq_thermal_bpmp_to_host_request *)ch->ib->data; + offset = offsetof(struct tegra_bpmp_mb_data, data); + iosys_map_memcpy_from(&req, &ch->ib, offset, sizeof(req)); - if (req->type != CMD_THERMAL_HOST_TRIP_REACHED) { - dev_err(tegra->dev, "%s: invalid request type: %d\n", - __func__, req->type); + if (req.type != CMD_THERMAL_HOST_TRIP_REACHED) { + dev_err(tegra->dev, "%s: invalid request type: %d\n", __func__, req.type); tegra_bpmp_mrq_return(ch, -EINVAL, NULL, 0); return; } for (i = 0; i < tegra->num_zones; ++i) { - if (tegra->zones[i]->idx != req->host_trip_reached.zone) + if (tegra->zones[i]->idx != req.host_trip_reached.zone) continue; schedule_work(&tegra->zones[i]->tz_device_update_work); @@ -129,7 +130,7 @@ static void bpmp_mrq_thermal(unsigned int mrq, struct tegra_bpmp_channel *ch, } dev_err(tegra->dev, "%s: invalid thermal zone: %d\n", __func__, - req->host_trip_reached.zone); + req.host_trip_reached.zone); tegra_bpmp_mrq_return(ch, -EINVAL, NULL, 0); } |