summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ppc/lib/rheap.c3
-rw-r--r--arch/ppc/syslib/m8xx_setup.c2
-rw-r--r--arch/ppc/xmon/ppc-opc.c7
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/ppc/lib/rheap.c b/arch/ppc/lib/rheap.c
index 31e511856dc5..d40700795a9c 100644
--- a/arch/ppc/lib/rheap.c
+++ b/arch/ppc/lib/rheap.c
@@ -14,6 +14,7 @@
*/
#include <linux/types.h>
#include <linux/errno.h>
+#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/slab.h>
@@ -654,7 +655,7 @@ void rh_dump(rh_info_t * info)
int maxnr;
int i, nr;
- maxnr = sizeof(st) / sizeof(st[0]);
+ maxnr = ARRAY_SIZE(st);
printk(KERN_INFO
"info @0x%p (%d slots empty / %d max)\n",
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index d8d299bd1a12..01e48d88f22d 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -77,7 +77,7 @@ static struct mtd_partition mpc8xxads_partitions[] = {
}
};
-#define mpc8xxads_part_num (sizeof (mpc8xxads_partitions) / sizeof (mpc8xxads_partitions[0]))
+#define mpc8xxads_part_num ARRAY_SIZE(mpc8xxads_partitions)
#endif
diff --git a/arch/ppc/xmon/ppc-opc.c b/arch/ppc/xmon/ppc-opc.c
index 533a6c9973d4..034313cef6e7 100644
--- a/arch/ppc/xmon/ppc-opc.c
+++ b/arch/ppc/xmon/ppc-opc.c
@@ -19,6 +19,7 @@ along with this file; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <linux/posix_types.h>
+#include <linux/kernel.h>
#include "ansidecl.h"
#include "ppc.h"
@@ -2669,8 +2670,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
};
-const int powerpc_num_opcodes =
- sizeof (powerpc_opcodes) / sizeof (powerpc_opcodes[0]);
+const int powerpc_num_opcodes = ARRAY_SIZE(powerpc_opcodes);
/* The macro table. This is only used by the assembler. */
@@ -2717,5 +2717,4 @@ const struct powerpc_macro powerpc_macros[] = {
};
-const int powerpc_num_macros =
- sizeof (powerpc_macros) / sizeof (powerpc_macros[0]);
+const int powerpc_num_macros = ARRAY_SIZE(powerpc_macros);
t/drivers/mmc?id=a7a6186c4b96d4ce5c1d13d91b7f862b0adc0e72'>sdhci: add support for the SysKonnect CardBus2SDIO adapterNicolas Pitre2009-12-151-0/+75 * mmci-omap: remove bogus check for host->iclkLadislav Michl2009-12-151-5/+5 * davinci: mmc: add cpufreq supportChaithrika U S2009-12-151-16/+84 * mmc: davinci: modify data types of EDMA related variablesSudhakar Rajashekhara2009-12-151-2/+2 * DaVinci: MMC: MMC/SD controller driver for DaVinci familyVipin Bhandari2009-12-153-0/+1290 * drivers/mmc: Move dereference after NULL testJulia Lawall2009-12-151-1/+2 * sdio: rework cis tuple parsingAlbert Herranz2009-12-151-74/+93 * mxcmmc: fix error path in mxcmci_probeUwe Kleine-König2009-12-151-5/+5 * const: constify remaining dev_pm_opsAlexey Dobriyan2009-12-152-2/+2 * Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/pow...Linus Torvalds2009-12-121-0/+2 |\ | * Merge commit 'origin/master' into nextBenjamin Herrenschmidt2009-12-094-16/+18 | |\ | * \ Merge commit 'gcl/next' into nextBenjamin Herrenschmidt2009-12-091-0/+2 | |\ \ | | * | mmc: fix missing module license declaration in of_mmc_spi.cGrant Likely2009-11-04