Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/odroid refactor pin setting in odroid_device...



details:   https://anonhg.NetBSD.org/src/rev/c6ab67bef6f5
branches:  trunk
changeset: 329134:c6ab67bef6f5
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Sat May 10 11:03:45 2014 +0000

description:
refactor pin setting in odroid_device_register() to remove an indent
preventing potentional lots of line breaks due to the 80 char line limit.

diffstat:

 sys/arch/evbarm/odroid/odroid_machdep.c |  30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diffs (54 lines):

diff -r 00cbf7403426 -r c6ab67bef6f5 sys/arch/evbarm/odroid/odroid_machdep.c
--- a/sys/arch/evbarm/odroid/odroid_machdep.c   Sat May 10 10:47:17 2014 +0000
+++ b/sys/arch/evbarm/odroid/odroid_machdep.c   Sat May 10 11:03:45 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: odroid_machdep.c,v 1.11 2014/05/09 22:20:41 reinoud Exp $ */
+/*     $NetBSD: odroid_machdep.c,v 1.12 2014/05/10 11:03:45 reinoud Exp $ */
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.11 2014/05/09 22:20:41 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.12 2014/05/10 11:03:45 reinoud Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_exynos.h"
@@ -553,22 +553,22 @@
        if (device_is_a(self, "mct"))
                prop_dictionary_set_cstring(dict, "heartbeat", "led1");
 
-       if (device_is_a(self, "exyogpio")) {
 #ifdef EXYNOS4
-               if (IS_EXYNOS4_P()) {
-                       /* unused bits */
-                       odroid_exynos4_gpio_ncs(self, dict);
-                       /* explicit pin settings */
-                       prop_dictionary_set_cstring(dict, "led1", ">GPC1[0]");
-               }
+       if (device_is_a(self, "exyogpio") && (IS_EXYNOS4_P())) {
+               /* unused bits */
+               odroid_exynos4_gpio_ncs(self, dict);
+
+               /* explicit pin settings */
+               prop_dictionary_set_cstring(dict, "led1", ">GPC1[0]");
+       }
 #endif
 #ifdef EXYNOS5
-               if (IS_EXYNOS5_P()) {
-                       /* unused bits */
-                       odroid_exynos5_gpio_ncs(self, dict);
-                       /* explicit pin settings */
-               }
+       if (device_is_a(self, "exyogpio") && (IS_EXYNOS5_P())) {
+               /* unused bits */
+               odroid_exynos5_gpio_ncs(self, dict);
+
+               /* explicit pin settings */
+       }
 #endif
-       }
 }
 



Home | Main Index | Thread Index | Old Index