thermal: rcar_gen3_thermal: Fix to show correct trip points number
authorJiada Wang <jiada_wang@mentor.com>
Thu, 9 May 2019 09:09:17 +0000 (18:09 +0900)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 14 May 2019 14:00:43 +0000 (07:00 -0700)
commite380ea8117ce8c83c5da7063a3587a728132de0b
tree2ce423cf118d67b254c987cb46fb77fee6258743
parent20386f0d84a22214d1f037dedfffb6709dd0117a
thermal: rcar_gen3_thermal: Fix to show correct trip points number

Currently after store trip points number in 'ret', it is overwritten
afterwards, this cause incorrect trip point number always be shown in
the debug information after register of each thermal zone.

This patch fix this issue by moving get of trip number to
end of thermal zone registration.

Fixes: 6269e9f790e8d ("thermal: rcar_gen3_thermal: Register hwmon sysfs interface")
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/rcar_gen3_thermal.c