]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/memory.h
Merge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[net-next-2.6.git] / include / linux / memory.h
index 86a6c0f0518db5654bf8a17af4baa9a17462501b..37fa19b34ef584bcd8626059675a33baef2df939 100644 (file)
@@ -99,6 +99,17 @@ 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.