Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'driver-core-4.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
"Here are two fixes for the driver core that resolve some reported
issues.

One is a regression from 4.0, the other a fixes a reported oops that
has been there since 3.19.

Both have been in linux-next for a while with no problems"

* tag 'driver-core-4.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
drivers/base: cacheinfo: handle absence of caches
drivers: of/base: move of_init to driver_init

+12 -6
+1 -1
drivers/base/cacheinfo.c
··· 179 179 { 180 180 int ret; 181 181 182 - if (init_cache_level(cpu)) 182 + if (init_cache_level(cpu) || !cache_leaves(cpu)) 183 183 return -ENOENT; 184 184 185 185 per_cpu_cacheinfo(cpu) = kcalloc(cache_leaves(cpu),
+2
drivers/base/init.c
··· 8 8 #include <linux/device.h> 9 9 #include <linux/init.h> 10 10 #include <linux/memory.h> 11 + #include <linux/of.h> 11 12 12 13 #include "base.h" 13 14 ··· 35 34 cpu_dev_init(); 36 35 memory_dev_init(); 37 36 container_dev_init(); 37 + of_core_init(); 38 38 }
+3 -5
drivers/of/base.c
··· 189 189 return 0; 190 190 } 191 191 192 - static int __init of_init(void) 192 + void __init of_core_init(void) 193 193 { 194 194 struct device_node *np; 195 195 ··· 198 198 of_kset = kset_create_and_add("devicetree", NULL, firmware_kobj); 199 199 if (!of_kset) { 200 200 mutex_unlock(&of_mutex); 201 - return -ENOMEM; 201 + pr_err("devicetree: failed to register existing nodes\n"); 202 + return; 202 203 } 203 204 for_each_of_allnodes(np) 204 205 __of_attach_node_sysfs(np); ··· 208 207 /* Symlink in /proc as required by userspace ABI */ 209 208 if (of_root) 210 209 proc_symlink("device-tree", NULL, "/sys/firmware/devicetree/base"); 211 - 212 - return 0; 213 210 } 214 - core_initcall(of_init); 215 211 216 212 static struct property *__of_find_property(const struct device_node *np, 217 213 const char *name, int *lenp)
+6
include/linux/of.h
··· 121 121 extern raw_spinlock_t devtree_lock; 122 122 123 123 #ifdef CONFIG_OF 124 + void of_core_init(void); 125 + 124 126 static inline bool is_of_node(struct fwnode_handle *fwnode) 125 127 { 126 128 return fwnode && fwnode->type == FWNODE_OF; ··· 377 375 bool of_console_check(struct device_node *dn, char *name, int index); 378 376 379 377 #else /* CONFIG_OF */ 378 + 379 + static inline void of_core_init(void) 380 + { 381 + } 380 382 381 383 static inline bool is_of_node(struct fwnode_handle *fwnode) 382 384 {