mm, hotplug: avoid compiling memory hotremove functions when disabled
[linux-2.6-block.git] / arch / powerpc / platforms / pseries / hotplug-memory.c
index 2372c609fa2b241962e9d7c9a5b72be2c1564322..9a432de363b8d081d0663f8795f28ff7354ce378 100644 (file)
@@ -72,6 +72,7 @@ unsigned long memory_block_size_bytes(void)
        return get_memblock_size();
 }
 
+#ifdef CONFIG_MEMORY_HOTREMOVE
 static int pseries_remove_memblock(unsigned long base, unsigned int memblock_size)
 {
        unsigned long start, start_pfn;
@@ -153,6 +154,17 @@ static int pseries_remove_memory(struct device_node *np)
        ret = pseries_remove_memblock(base, lmb_size);
        return ret;
 }
+#else
+static inline int pseries_remove_memblock(unsigned long base,
+                                         unsigned int memblock_size)
+{
+       return -EOPNOTSUPP;
+}
+static inline int pseries_remove_memory(struct device_node *np)
+{
+       return -EOPNOTSUPP;
+}
+#endif /* CONFIG_MEMORY_HOTREMOVE */
 
 static int pseries_add_memory(struct device_node *np)
 {