From 8b56a45eb20cb44e3b8d2028eb18533fd7870423 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Fri, 6 Dec 2013 10:27:48 +0100 Subject: [PATCH] karo: tx6: general cleanups - make to_tx6_esdhc_cfg() a static inline function rather than macro - make struct node_info static --- board/karo/tx6/tx6qdl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/board/karo/tx6/tx6qdl.c b/board/karo/tx6/tx6qdl.c index e748111bb7..ff29d66f61 100644 --- a/board/karo/tx6/tx6qdl.c +++ b/board/karo/tx6/tx6qdl.c @@ -516,9 +516,7 @@ static struct tx6_esdhc_cfg { static inline struct tx6_esdhc_cfg *to_tx6_esdhc_cfg(struct fsl_esdhc_cfg *cfg) { - void *p = cfg; - - return p - offsetof(struct tx6_esdhc_cfg, cfg); + return container_of(cfg, struct tx6_esdhc_cfg, cfg); } int board_mmc_getcd(struct mmc *mmc) @@ -1280,7 +1278,7 @@ void get_board_serial(struct tag_serialnr *serialnr) #ifdef CONFIG_FDT_FIXUP_PARTITIONS #include #include -struct node_info nodes[] = { +static struct node_info nodes[] = { { "fsl,imx6q-gpmi-nand", MTD_DEV_TYPE_NAND, }, }; -- 2.39.2