X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Flinux%2Fmemory.h;h=37fa19b34ef584bcd8626059675a33baef2df939;hb=714f83d5d9f7c785f622259dad1f4fad12d64664;hp=3fdc10806d31b9f55470dc3fc3949653ceb1498d;hpb=97d61b8e3aef163a75f80f4762794c154572293d;p=linux-2.6-omap-h63xx.git 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_ */