Commit 45ec836
committed
thermal: core: Drop thermal_zone_device_is_enabled()
JIRA: https://issues.redhat.com/browse/RHEL-61357
commit 54fccad
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date: Mon Aug 26 18:37:16 2024 +0200
thermal: core: Drop thermal_zone_device_is_enabled()
There are only two callers of thermal_zone_device_is_enabled()
and one of them call is under the zone lock and the other one uses
lockdep_assert_held() on that lock. Thus the lockdep_assert_held()
in thermal_zone_device_is_enabled() is redundant and it could be
dropped, but then the function would merely become a wrapper around
a simple tz->mode check that is more convenient to do directly.
Accordingly, drop thermal_zone_device_is_enabled() altogether and update
its callers to check tz->mode directly as appropriate.
While at it, combine the tz->mode and tz->suspended checks in
__thermal_zone_device_update() because they are of a similar category
and if any of them evaluates to "true", the outcome is the same.
No intentinal functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/9353673.CDJkKcVGEf@rjwysocki.net
Signed-off-by: David Arcari <darcari@redhat.com>1 parent b6c59cd commit 45ec836
File tree
3 files changed
+2
-15
lines changed- drivers/thermal
3 files changed
+2
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
| 550 | + | |
554 | 551 | | |
555 | 552 | | |
556 | 553 | | |
| |||
652 | 649 | | |
653 | 650 | | |
654 | 651 | | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | 652 | | |
663 | 653 | | |
664 | 654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | 290 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
0 commit comments