pstore: make pstore write function return normal success/fail value
[pandora-kernel.git] / include / linux / pstore.h
index 2455ef2..ea56732 100644 (file)
@@ -32,15 +32,18 @@ enum pstore_type_id {
 struct pstore_info {
        struct module   *owner;
        char            *name;
-       struct mutex    buf_mutex;      /* serialize access to 'buf' */
+       spinlock_t      buf_lock;       /* serialize access to 'buf' */
        char            *buf;
        size_t          bufsize;
        int             (*open)(struct pstore_info *psi);
        int             (*close)(struct pstore_info *psi);
        ssize_t         (*read)(u64 *id, enum pstore_type_id *type,
-                       struct timespec *time);
-       u64             (*write)(enum pstore_type_id type, size_t size);
-       int             (*erase)(u64 id);
+                       struct timespec *time, struct pstore_info *psi);
+       int             (*write)(enum pstore_type_id type, u64 *id,
+                       unsigned int part, size_t size, struct pstore_info *psi);
+       int             (*erase)(enum pstore_type_id type, u64 id,
+                       struct pstore_info *psi);
+       void            *data;
 };
 
 #ifdef CONFIG_PSTORE