diff options
| author | James Morris <jmorris@namei.org> | 2009-05-08 17:56:47 +1000 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2009-05-08 17:56:47 +1000 |
| commit | d254117099d711f215e62427f55dfb8ebd5ad011 (patch) | |
| tree | 0848ff8dd74314fec14a86497f8d288c86ba7c65 /include/linux/memory.h | |
| parent | 07ff7a0b187f3951788f64ae1f30e8109bc8e9eb (diff) | |
| parent | 8c9ed899b44c19e81859fbb0e9d659fe2f8630fc (diff) | |
Merge branch 'master' into next
Diffstat (limited to 'include/linux/memory.h')
| -rw-r--r-- | include/linux/memory.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/memory.h b/include/linux/memory.h index 3fdc10806d3..37fa19b34ef 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h @@ -99,4 +99,21 @@ enum mem_add_context { BOOT, HOTPLUG }; #define hotplug_memory_notifier(fn, pri) do { } while (0) #endif +/* + * 'struct memory_accessor' is a generic interface to provide + * in-kernel access to persistent memory such as i2c or SPI EEPROMs + */ +struct memory_accessor { + ssize_t (*read)(struct memory_accessor *, char *buf, off_t offset, + size_t count); + ssize_t (*write)(struct memory_accessor *, const char *buf, + off_t offset, size_t count); +}; + +/* + * Kernel text modification mutex, used for code patching. Users of this lock + * can sleep. + */ +extern struct mutex text_mutex; + #endif /* _LINUX_MEMORY_H_ */ |
