reg->tmu_pmin is set to non-zero value only for Exynos5440 so replace check for non-zero value of reg->tmu_pmin by explicitly checking for Exynos5440 SoC type. Then remove no longer needed reg->tmu_pmin register abstraction. There should be no functional changes caused by this patch. Cc: Amit Daniel Kachhap <amit.daniel@xxxxxxxxxxx> Cc: Lukasz Majewski <l.majewski@xxxxxxxxxxx> Cc: Eduardo Valentin <edubezval@xxxxxxxxx> Cc: Zhang Rui <rui.zhang@xxxxxxxxx> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx> Acked-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> --- drivers/thermal/samsung/exynos_tmu.c | 4 ++-- drivers/thermal/samsung/exynos_tmu.h | 3 --- drivers/thermal/samsung/exynos_tmu_data.c | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 839b07b..411c465 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -271,8 +271,8 @@ static int exynos_tmu_initialize(struct platform_device *pdev) } } /*Clear the PMIN in the common TMU register*/ - if (reg->tmu_pmin && !data->id) - writel(0, data->base_second + reg->tmu_pmin); + if (data->soc == SOC_ARCH_EXYNOS5440 && !data->id) + writel(0, data->base_second + EXYNOS5440_TMU_PMIN); out: clk_disable(data->clk); mutex_unlock(&data->lock); diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index 5c2cef1..e8510aa 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h @@ -92,7 +92,6 @@ enum soc_type { * @tmu_intstat: Register containing the interrupt status values. * @tmu_intclear: Register for clearing the raised interrupt status. * @emul_con: TMU emulation controller register. - * @tmu_pmin: register to get/set the Pmin value. */ struct exynos_tmu_registers { u32 tmu_ctrl; @@ -116,8 +115,6 @@ struct exynos_tmu_registers { u32 tmu_intclear; u32 emul_con; - - u32 tmu_pmin; }; /** diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c index 557b4a5..fe063d4 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c +++ b/drivers/thermal/samsung/exynos_tmu_data.c @@ -402,7 +402,6 @@ static const struct exynos_tmu_registers exynos5440_tmu_registers = { .tmu_intstat = EXYNOS5440_TMU_S0_7_IRQ, .tmu_intclear = EXYNOS5440_TMU_S0_7_IRQ, .emul_con = EXYNOS5440_TMU_S0_7_DEBUG, - .tmu_pmin = EXYNOS5440_TMU_PMIN, }; #define EXYNOS5440_TMU_DATA \ -- 1.8.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html