]> git.baikalelectronics.ru Git - kernel.git/commit
memory: mtk-smi: Use ARRAY_SIZE to define MTK_SMI_CLK_NR_MAX
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Fri, 15 Oct 2021 15:15:57 +0000 (17:15 +0200)
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Thu, 27 Jan 2022 09:41:14 +0000 (10:41 +0100)
commit50ab2b1e0d3ca3e03f4e1c76f99104b788cca450
tree8d47f69d4677182edc3f892d7180c8fe3ed557f5
parent6e424e6bafec35e47db4b693fe41eff065b7dbf6
memory: mtk-smi: Use ARRAY_SIZE to define MTK_SMI_CLK_NR_MAX

This definition is tied to the number of SMI common clocks (the array
mtk_smi_common_clks): improve the definition by using the ARRAY_SIZE
macro instead. That will also reduce room for mistakes when updating
the aforementioned array in the future.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20211015151557.510726-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
drivers/memory/mtk-smi.c