Commit fa4f9c9
committed
thermal: core: Consolidate thermal zone locking in the exit path
In analogy with a previous change in the thermal zone initialization
path, to avoid acquiring the thermal zone lock and releasing it multiple
times back and forth unnecessarily, move all of the code running under
thermal_list_lock in thermal_zone_device_unregister() into a new
function called thermal_zone_exit() and make the latter acquire the
thermal zone lock only once and release it along with thermal_list_lock.
For this purpose, provide an "unlocked" variant of
thermal_zone_cdev_unbind() to be called by thermal_zone_exit() under the
thermal zone lock.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Lukasz Luba <[email protected]>1 parent 1dae3e7 commit fa4f9c9
1 file changed
+39
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1268 | 1268 | | |
1269 | 1269 | | |
1270 | 1270 | | |
1271 | | - | |
1272 | | - | |
| 1271 | + | |
| 1272 | + | |
1273 | 1273 | | |
1274 | 1274 | | |
1275 | 1275 | | |
1276 | | - | |
1277 | | - | |
1278 | 1276 | | |
1279 | 1277 | | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
1280 | 1286 | | |
1281 | 1287 | | |
1282 | 1288 | | |
| |||
1596 | 1602 | | |
1597 | 1603 | | |
1598 | 1604 | | |
1599 | | - | |
1600 | | - | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
| 1605 | + | |
1604 | 1606 | | |
1605 | 1607 | | |
1606 | | - | |
1607 | | - | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
| 1608 | + | |
1612 | 1609 | | |
1613 | 1610 | | |
1614 | | - | |
1615 | | - | |
1616 | | - | |
1617 | | - | |
1618 | | - | |
1619 | | - | |
1620 | | - | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
1621 | 1615 | | |
1622 | 1616 | | |
1623 | 1617 | | |
1624 | 1618 | | |
1625 | 1619 | | |
1626 | | - | |
| 1620 | + | |
1627 | 1621 | | |
1628 | | - | |
1629 | | - | |
1630 | | - | |
| 1622 | + | |
1631 | 1623 | | |
1632 | | - | |
| 1624 | + | |
1633 | 1625 | | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1634 | 1629 | | |
1635 | 1630 | | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
1636 | 1648 | | |
1637 | 1649 | | |
1638 | 1650 | | |
| |||
0 commit comments