Commit 2dc2f76
mlxsw: core: Use different get_trend() callbacks for different thermal zones
The driver registers three different types of thermal zones: For the
ASIC itself, for port modules and for gearboxes.
Currently, all three types use the same get_trend() callback which does
not work correctly for the ASIC thermal zone. The callback assumes that
the device data is of type 'struct mlxsw_thermal_module', whereas for
the ASIC thermal zone 'struct mlxsw_thermal' is passed as device data.
Fix this by using one get_trend() callback for the ASIC thermal zone and
another for the other two types.
Fixes: 6f73862 ("mlxsw: core: Add the hottest thermal zone detection")
Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 4e2905a commit 2dc2f76
1 file changed
+19
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
395 | | - | |
| 394 | + | |
396 | 395 | | |
397 | 396 | | |
398 | 397 | | |
| |||
593 | 592 | | |
594 | 593 | | |
595 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
596 | 611 | | |
597 | 612 | | |
598 | 613 | | |
| |||
604 | 619 | | |
605 | 620 | | |
606 | 621 | | |
607 | | - | |
| 622 | + | |
608 | 623 | | |
609 | 624 | | |
610 | 625 | | |
| |||
643 | 658 | | |
644 | 659 | | |
645 | 660 | | |
646 | | - | |
| 661 | + | |
647 | 662 | | |
648 | 663 | | |
649 | 664 | | |
| |||
0 commit comments