drivers/base/node.c: switch to register_hotmemory_notifier()
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 29 Apr 2013 22:08:07 +0000 (15:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 29 Apr 2013 22:54:36 +0000 (15:54 -0700)
Squishes a warning which my change to hotplug_memory_notifier() added.

I want to keep that warning, because it is punishment for failnig to check
the hotplug_memory_notifier() return value.

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/base/node.c

index fac124a7e1c5b0203b4953e6fd30ce9fbfe5c290..7616a77ca322580958d4f21fff99a54d883440c0 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/mm.h>
 #include <linux/memory.h>
 #include <linux/vmstat.h>
+#include <linux/notifier.h>
 #include <linux/node.h>
 #include <linux/hugetlb.h>
 #include <linux/compaction.h>
@@ -683,8 +684,11 @@ static int __init register_node_type(void)
 
        ret = subsys_system_register(&node_subsys, cpu_root_attr_groups);
        if (!ret) {
-               hotplug_memory_notifier(node_memory_callback,
-                                       NODE_CALLBACK_PRI);
+               static struct notifier_block node_memory_callback_nb = {
+                       .notifier_call = node_memory_callback,
+                       .priority = NODE_CALLBACK_PRI,
+               };
+               register_hotmemory_notifier(&node_memory_callback_nb);
        }
 
        /*