]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
karo: tx6: general cleanups
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 6 Dec 2013 09:27:48 +0000 (10:27 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 6 Dec 2013 09:27:48 +0000 (10:27 +0100)
- make to_tx6_esdhc_cfg() a static inline function rather than macro
- make struct node_info static

board/karo/tx6/tx6qdl.c

index e748111bb754f1a7f0e252f9e4c3151c03f8eb64..ff29d66f612645cf1a639a169ae2ded44e642216 100644 (file)
@@ -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 <jffs2/jffs2.h>
 #include <mtd_node.h>
-struct node_info nodes[] = {
+static struct node_info nodes[] = {
        { "fsl,imx6q-gpmi-nand", MTD_DEV_TYPE_NAND, },
 };