Commit 80fb74c3 authored by Shraddha Barke's avatar Shraddha Barke Committed by Greg Kroah-Hartman

Staging: sm750fb: Use ARRAY_SIZE macro

ARRAY_SIZE is more concise to use when the size of an array is divided
by the size of its first element.

Changes made using Coccinelle-

@@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(E[...]))
+ ARRAY_SIZE(E)
Signed-off-by: default avatarShraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f9459c0a
...@@ -384,10 +384,10 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll) ...@@ -384,10 +384,10 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
if (pll->clockType != MXCLK_PLL) { if (pll->clockType != MXCLK_PLL) {
xparm = &xparm_PIXEL[0]; xparm = &xparm_PIXEL[0];
xcnt = sizeof(xparm_PIXEL) / sizeof(xparm_PIXEL[0]); xcnt = ARRAY_SIZE(xparm_PIXEL);
} else { } else {
xparm = &xparm_MXCLK[0]; xparm = &xparm_MXCLK[0];
xcnt = sizeof(xparm_MXCLK) / sizeof(xparm_MXCLK[0]); xcnt = ARRAY_SIZE(xparm_MXCLK);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment