summaryrefslogtreecommitdiffstats
path: root/drivers/staging/sm750fb
diff options
context:
space:
mode:
authorShraddha Barke <shraddha.6596@gmail.com>2015-10-09 00:55:17 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-12 20:32:07 -0700
commit80fb74c38709fd12e73f33ae464b37821cb01136 (patch)
treedf5d6c162c21a57fafcca8e172c5b69edd98076a /drivers/staging/sm750fb
parentf9459c0aa4d924fb12e2f490bcbe790fa77ceb1e (diff)
downloadlinux-80fb74c38709fd12e73f33ae464b37821cb01136.tar.bz2
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: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb')
-rw-r--r--drivers/staging/sm750fb/ddk750_chip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index 0734044d7040..02e6f640f3d4 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -384,10 +384,10 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
if (pll->clockType != MXCLK_PLL) {
xparm = &xparm_PIXEL[0];
- xcnt = sizeof(xparm_PIXEL) / sizeof(xparm_PIXEL[0]);
+ xcnt = ARRAY_SIZE(xparm_PIXEL);
} else {
xparm = &xparm_MXCLK[0];
- xcnt = sizeof(xparm_MXCLK) / sizeof(xparm_MXCLK[0]);
+ xcnt = ARRAY_SIZE(xparm_MXCLK);
}