]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/base/memory.c
sysdev: Pass the attribute to the low level sysdev show/store function
[linux-2.6-omap-h63xx.git] / drivers / base / memory.c
index 8ce6de5a7e289f4bcf5138d96d013ba71117d66f..4d4e0e7b6e925e656c8346d63671f0179bca880e 100644 (file)
@@ -53,11 +53,13 @@ int register_memory_notifier(struct notifier_block *nb)
 {
         return blocking_notifier_chain_register(&memory_chain, nb);
 }
+EXPORT_SYMBOL(register_memory_notifier);
 
 void unregister_memory_notifier(struct notifier_block *nb)
 {
         blocking_notifier_chain_unregister(&memory_chain, nb);
 }
+EXPORT_SYMBOL(unregister_memory_notifier);
 
 /*
  * register_memory - Setup a sysfs device for a memory block
@@ -90,7 +92,8 @@ unregister_memory(struct memory_block *memory, struct mem_section *section)
  * uses.
  */
 
-static ssize_t show_mem_phys_index(struct sys_device *dev, char *buf)
+static ssize_t show_mem_phys_index(struct sys_device *dev,
+                       struct sysdev_attribute *attr, char *buf)
 {
        struct memory_block *mem =
                container_of(dev, struct memory_block, sysdev);
@@ -100,7 +103,8 @@ static ssize_t show_mem_phys_index(struct sys_device *dev, char *buf)
 /*
  * online, offline, going offline, etc.
  */
-static ssize_t show_mem_state(struct sys_device *dev, char *buf)
+static ssize_t show_mem_state(struct sys_device *dev,
+                       struct sysdev_attribute *attr, char *buf)
 {
        struct memory_block *mem =
                container_of(dev, struct memory_block, sysdev);
@@ -215,7 +219,8 @@ out:
 }
 
 static ssize_t
-store_mem_state(struct sys_device *dev, const char *buf, size_t count)
+store_mem_state(struct sys_device *dev,
+               struct sysdev_attribute *attr, const char *buf, size_t count)
 {
        struct memory_block *mem;
        unsigned int phys_section_nr;
@@ -246,7 +251,8 @@ out:
  * s.t. if I offline all of these sections I can then
  * remove the physical device?
  */
-static ssize_t show_phys_device(struct sys_device *dev, char *buf)
+static ssize_t show_phys_device(struct sys_device *dev,
+                               struct sysdev_attribute *attr, char *buf)
 {
        struct memory_block *mem =
                container_of(dev, struct memory_block, sysdev);