[kernel] r22439 - in dists/sid/linux/debian: . patches patches/features/all

Ben Hutchings benh at moszumanska.debian.org
Sun Mar 1 15:13:11 UTC 2015


Author: benh
Date: Sun Mar  1 15:13:10 2015
New Revision: 22439

Log:
of.h: Keep extern declaration of of_* variables when !CONFIG_OF

Fixes build failure in simplefb on architectures without CONFIG_OF.

Added:
   dists/sid/linux/debian/patches/features/all/of.h-keep-extern-declaration-of-of_-variables-when-c.patch
Modified:
   dists/sid/linux/debian/changelog
   dists/sid/linux/debian/patches/series

Modified: dists/sid/linux/debian/changelog
==============================================================================
--- dists/sid/linux/debian/changelog	Sun Mar  1 06:35:19 2015	(r22438)
+++ dists/sid/linux/debian/changelog	Sun Mar  1 15:13:10 2015	(r22439)
@@ -191,6 +191,8 @@
     - qxl: Disable by default, as it is incompatible with wheezy's
       xserver-xorg-video-qxl. It can be forced to load with module
       parameter modeset=1.
+  * of.h: Keep extern declaration of of_* variables when !CONFIG_OF
+    (for simplefb)
 
   [ Helge Deller ]
   * [alpha] build debian-installer udeb packages

Added: dists/sid/linux/debian/patches/features/all/of.h-keep-extern-declaration-of-of_-variables-when-c.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux/debian/patches/features/all/of.h-keep-extern-declaration-of-of_-variables-when-c.patch	Sun Mar  1 15:13:10 2015	(r22439)
@@ -0,0 +1,39 @@
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Fri, 14 Nov 2014 13:26:52 +0100
+Subject: of.h: Keep extern declaration of of_* variables when !CONFIG_OF
+Origin: https://git.kernel.org/linus/6d09dc6b74caaca83e32e67f2454406041d58fb0
+
+Keep the extern declaration of of_allnodes and friends, when building without
+of support, this way code using them can be written like this:
+
+	if (IS_ENABLED(CONFIG_OF_PLATFORM) && of_chosen) {
+		for_each_child_of_node(of_chosen, np)
+			...
+	}
+
+And rely on the compiler optimizing it away, avoiding the need for #ifdef-ery.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
+---
+ include/linux/of.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/include/linux/of.h
++++ b/include/linux/of.h
+@@ -107,14 +107,13 @@ static inline struct device_node *of_nod
+ static inline void of_node_put(struct device_node *node) { }
+ #endif /* !CONFIG_OF_DYNAMIC */
+ 
+-#ifdef CONFIG_OF
+-
+ /* Pointer for first entry in chain of all nodes. */
+ extern struct device_node *of_allnodes;
+ extern struct device_node *of_chosen;
+ extern struct device_node *of_aliases;
+ extern raw_spinlock_t devtree_lock;
+ 
++#ifdef CONFIG_OF
+ static inline bool of_have_populated_dt(void)
+ {
+ 	return of_allnodes != NULL;

Modified: dists/sid/linux/debian/patches/series
==============================================================================
--- dists/sid/linux/debian/patches/series	Sun Mar  1 06:35:19 2015	(r22438)
+++ dists/sid/linux/debian/patches/series	Sun Mar  1 15:13:10 2015	(r22439)
@@ -213,6 +213,7 @@
 features/all/simplefb-formalize-pseudo-palette-handling.patch
 features/all/simplefb-add-goto-error-path-to-probe.patch
 features/all/simplefb-add-clock-handling-code.patch
+features/all/of.h-keep-extern-declaration-of-of_-variables-when-c.patch
 features/all/simplefb-Add-support-for-enumerating-simplefb-dt-nod.patch
 features/all/simplefb-Change-simplefb_init-from-module_init-to-fs.patch
 features/all/simplefb-Fix-build-errors-when-CONFIG_COMMON_CLK-is-.patch



More information about the Kernel-svn-changes mailing list