lkml.org 
[lkml]   [2022]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v5 10/30] thermal/drivers/exynos: Replace of_thermal_is_trip_valid() by thermal_zone_get_trip()
    Date
    The thermal_zone_get_trip() does the same check as
    of_thermal_is_trip_valid(). Replace the call to
    of_thermal_is_trip_valid() by thermal_zone_get_trip().

    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    ---
    drivers/thermal/samsung/exynos_tmu.c | 9 ++++++---
    1 file changed, 6 insertions(+), 3 deletions(-)

    diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
    index 91e6860b5ec4..34b460092308 100644
    --- a/drivers/thermal/samsung/exynos_tmu.c
    +++ b/drivers/thermal/samsung/exynos_tmu.c
    @@ -554,13 +554,14 @@ static void exynos4210_tmu_control(struct platform_device *pdev, bool on)
    {
    struct exynos_tmu_data *data = platform_get_drvdata(pdev);
    struct thermal_zone_device *tz = data->tzd;
    + struct thermal_trip trip;
    unsigned int con, interrupt_en = 0, i;

    con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL));

    if (on) {
    for (i = 0; i < data->ntrip; i++) {
    - if (!of_thermal_is_trip_valid(tz, i))
    + if (thermal_zone_get_trip(tz, i, &trip))
    continue;

    interrupt_en |=
    @@ -584,13 +585,14 @@ static void exynos5433_tmu_control(struct platform_device *pdev, bool on)
    {
    struct exynos_tmu_data *data = platform_get_drvdata(pdev);
    struct thermal_zone_device *tz = data->tzd;
    + struct thermal_trip trip;
    unsigned int con, interrupt_en = 0, pd_det_en, i;

    con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL));

    if (on) {
    for (i = 0; i < data->ntrip; i++) {
    - if (!of_thermal_is_trip_valid(tz, i))
    + if (thermal_zone_get_trip(tz, i, &trip))
    continue;

    interrupt_en |=
    @@ -615,13 +617,14 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on)
    {
    struct exynos_tmu_data *data = platform_get_drvdata(pdev);
    struct thermal_zone_device *tz = data->tzd;
    + struct thermal_trip trip;
    unsigned int con, interrupt_en = 0, i;

    con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL));

    if (on) {
    for (i = 0; i < data->ntrip; i++) {
    - if (!of_thermal_is_trip_valid(tz, i))
    + if (thermal_zone_get_trip(tz, i, &trip))
    continue;

    interrupt_en |=
    --
    2.34.1
    \
     
     \ /
      Last update: 2022-09-26 17:21    [W:4.186 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site