summaryrefslogtreecommitdiff
path: root/include/linux/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/memory.h')
-rw-r--r--include/linux/memory.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/memory.h b/include/linux/memory.h
index ec376e482abb..33f0ff0cf634 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -83,10 +83,14 @@ extern int memory_notify(unsigned long val, void *v);
#endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */
+#ifdef CONFIG_MEMORY_HOTPLUG
#define hotplug_memory_notifier(fn, pri) { \
static struct notifier_block fn##_mem_nb = \
{ .notifier_call = fn, .priority = pri }; \
register_memory_notifier(&fn##_mem_nb); \
}
+#else
+#define hotplug_memory_notifier(fn, pri) do { } while (0)
+#endif
#endif /* _LINUX_MEMORY_H_ */