diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 1 | ||||
-rw-r--r-- | drivers/base/dmapool.c | 4 | ||||
-rw-r--r-- | drivers/base/memory.c | 34 | ||||
-rw-r--r-- | drivers/base/topology.c | 2 |
4 files changed, 26 insertions, 15 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index e4b530ef757d..67b79a7592a9 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -386,6 +386,7 @@ void device_initialize(struct device *dev) | |||
386 | INIT_LIST_HEAD(&dev->node); | 386 | INIT_LIST_HEAD(&dev->node); |
387 | init_MUTEX(&dev->sem); | 387 | init_MUTEX(&dev->sem); |
388 | device_init_wakeup(dev, 0); | 388 | device_init_wakeup(dev, 0); |
389 | set_dev_node(dev, -1); | ||
389 | } | 390 | } |
390 | 391 | ||
391 | #ifdef CONFIG_SYSFS_DEPRECATED | 392 | #ifdef CONFIG_SYSFS_DEPRECATED |
diff --git a/drivers/base/dmapool.c b/drivers/base/dmapool.c index b2efbd4cf710..dbe0735f8c9e 100644 --- a/drivers/base/dmapool.c +++ b/drivers/base/dmapool.c | |||
@@ -126,7 +126,7 @@ dma_pool_create (const char *name, struct device *dev, | |||
126 | } else if (allocation < size) | 126 | } else if (allocation < size) |
127 | return NULL; | 127 | return NULL; |
128 | 128 | ||
129 | if (!(retval = kmalloc (sizeof *retval, SLAB_KERNEL))) | 129 | if (!(retval = kmalloc (sizeof *retval, GFP_KERNEL))) |
130 | return retval; | 130 | return retval; |
131 | 131 | ||
132 | strlcpy (retval->name, name, sizeof retval->name); | 132 | strlcpy (retval->name, name, sizeof retval->name); |
@@ -297,7 +297,7 @@ restart: | |||
297 | } | 297 | } |
298 | } | 298 | } |
299 | } | 299 | } |
300 | if (!(page = pool_alloc_page (pool, SLAB_ATOMIC))) { | 300 | if (!(page = pool_alloc_page (pool, GFP_ATOMIC))) { |
301 | if (mem_flags & __GFP_WAIT) { | 301 | if (mem_flags & __GFP_WAIT) { |
302 | DECLARE_WAITQUEUE (wait, current); | 302 | DECLARE_WAITQUEUE (wait, current); |
303 | 303 | ||
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index c6b7d9c4b651..74b96795d2f5 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
@@ -290,9 +290,8 @@ static CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL); | |||
290 | 290 | ||
291 | static int block_size_init(void) | 291 | static int block_size_init(void) |
292 | { | 292 | { |
293 | sysfs_create_file(&memory_sysdev_class.kset.kobj, | 293 | return sysfs_create_file(&memory_sysdev_class.kset.kobj, |
294 | &class_attr_block_size_bytes.attr); | 294 | &class_attr_block_size_bytes.attr); |
295 | return 0; | ||
296 | } | 295 | } |
297 | 296 | ||
298 | /* | 297 | /* |
@@ -323,12 +322,14 @@ static CLASS_ATTR(probe, 0700, NULL, memory_probe_store); | |||
323 | 322 | ||
324 | static int memory_probe_init(void) | 323 | static int memory_probe_init(void) |
325 | { | 324 | { |
326 | sysfs_create_file(&memory_sysdev_class.kset.kobj, | 325 | return sysfs_create_file(&memory_sysdev_class.kset.kobj, |
327 | &class_attr_probe.attr); | 326 | &class_attr_probe.attr); |
328 | return 0; | ||
329 | } | 327 | } |
330 | #else | 328 | #else |
331 | #define memory_probe_init(...) do {} while (0) | 329 | static inline int memory_probe_init(void) |
330 | { | ||
331 | return 0; | ||
332 | } | ||
332 | #endif | 333 | #endif |
333 | 334 | ||
334 | /* | 335 | /* |
@@ -431,9 +432,12 @@ int __init memory_dev_init(void) | |||
431 | { | 432 | { |
432 | unsigned int i; | 433 | unsigned int i; |
433 | int ret; | 434 | int ret; |
435 | int err; | ||
434 | 436 | ||
435 | memory_sysdev_class.kset.uevent_ops = &memory_uevent_ops; | 437 | memory_sysdev_class.kset.uevent_ops = &memory_uevent_ops; |
436 | ret = sysdev_class_register(&memory_sysdev_class); | 438 | ret = sysdev_class_register(&memory_sysdev_class); |
439 | if (ret) | ||
440 | goto out; | ||
437 | 441 | ||
438 | /* | 442 | /* |
439 | * Create entries for memory sections that were found | 443 | * Create entries for memory sections that were found |
@@ -442,11 +446,19 @@ int __init memory_dev_init(void) | |||
442 | for (i = 0; i < NR_MEM_SECTIONS; i++) { | 446 | for (i = 0; i < NR_MEM_SECTIONS; i++) { |
443 | if (!valid_section_nr(i)) | 447 | if (!valid_section_nr(i)) |
444 | continue; | 448 | continue; |
445 | add_memory_block(0, __nr_to_section(i), MEM_ONLINE, 0); | 449 | err = add_memory_block(0, __nr_to_section(i), MEM_ONLINE, 0); |
450 | if (!ret) | ||
451 | ret = err; | ||
446 | } | 452 | } |
447 | 453 | ||
448 | memory_probe_init(); | 454 | err = memory_probe_init(); |
449 | block_size_init(); | 455 | if (!ret) |
450 | 456 | ret = err; | |
457 | err = block_size_init(); | ||
458 | if (!ret) | ||
459 | ret = err; | ||
460 | out: | ||
461 | if (ret) | ||
462 | printk(KERN_ERR "%s() failed: %d\n", __FUNCTION__, ret); | ||
451 | return ret; | 463 | return ret; |
452 | } | 464 | } |
diff --git a/drivers/base/topology.c b/drivers/base/topology.c index 3d12b85b0962..067a9e8bc377 100644 --- a/drivers/base/topology.c +++ b/drivers/base/topology.c | |||
@@ -108,7 +108,6 @@ static int __cpuinit topology_add_dev(unsigned int cpu) | |||
108 | return rc; | 108 | return rc; |
109 | } | 109 | } |
110 | 110 | ||
111 | #ifdef CONFIG_HOTPLUG_CPU | ||
112 | static void __cpuinit topology_remove_dev(unsigned int cpu) | 111 | static void __cpuinit topology_remove_dev(unsigned int cpu) |
113 | { | 112 | { |
114 | struct sys_device *sys_dev = get_cpu_sysdev(cpu); | 113 | struct sys_device *sys_dev = get_cpu_sysdev(cpu); |
@@ -136,7 +135,6 @@ static int __cpuinit topology_cpu_callback(struct notifier_block *nfb, | |||
136 | } | 135 | } |
137 | return rc ? NOTIFY_BAD : NOTIFY_OK; | 136 | return rc ? NOTIFY_BAD : NOTIFY_OK; |
138 | } | 137 | } |
139 | #endif | ||
140 | 138 | ||
141 | static int __cpuinit topology_sysfs_init(void) | 139 | static int __cpuinit topology_sysfs_init(void) |
142 | { | 140 | { |