android: persistent_ram: move persistent_ram.h back to include/linux
Colin Cross [Mon, 16 Apr 2012 09:32:38 +0000 (14:32 +0530)]
When persistent_ram went in to staging, persistent_ram.h was moved
from include/linux to driver/staging/android.  To avoid having to
fix all the users, move it back to include/linux.

Change-Id: Ifa73781b4af5412042114a4b9b0476f6c4abb99e
Signed-off-by: Colin Cross <ccross@android.com>

Conflicts:

drivers/staging/android/persistent_ram.c
drivers/staging/android/ram_console.c

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

drivers/staging/android/persistent_ram.c
drivers/staging/android/persistent_ram.h [deleted file]
drivers/staging/android/ram_console.c

index b7f42fd..cafbbd0 100644 (file)
 #include <linux/io.h>
 #include <linux/list.h>
 #include <linux/memblock.h>
+#include <linux/persistent_ram.h>
 #include <linux/rslib.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 
-#include "persistent_ram.h"
-
 struct persistent_ram_buffer {
        uint32_t    sig;
        atomic_t    start;
diff --git a/drivers/staging/android/persistent_ram.h b/drivers/staging/android/persistent_ram.h
deleted file mode 100644 (file)
index f41e208..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2011 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __LINUX_PERSISTENT_RAM_H__
-#define __LINUX_PERSISTENT_RAM_H__
-
-#include <linux/device.h>
-#include <linux/kernel.h>
-#include <linux/list.h>
-#include <linux/types.h>
-
-struct persistent_ram_buffer;
-
-struct persistent_ram_descriptor {
-       const char      *name;
-       phys_addr_t     size;
-};
-
-struct persistent_ram {
-       phys_addr_t     start;
-       phys_addr_t     size;
-
-       int                                     num_descs;
-       struct persistent_ram_descriptor        *descs;
-
-       struct list_head node;
-};
-
-struct persistent_ram_zone {
-       struct list_head node;
-       void *vaddr;
-       struct persistent_ram_buffer *buffer;
-       size_t buffer_size;
-
-       /* ECC correction */
-       bool ecc;
-       char *par_buffer;
-       char *par_header;
-       struct rs_control *rs_decoder;
-       int corrected_bytes;
-       int bad_blocks;
-       int ecc_block_size;
-       int ecc_size;
-       int ecc_symsize;
-       int ecc_poly;
-
-       char *old_log;
-       size_t old_log_size;
-       size_t old_log_footer_size;
-       bool early;
-};
-
-int persistent_ram_early_init(struct persistent_ram *ram);
-
-struct persistent_ram_zone *persistent_ram_init_ringbuffer(struct device *dev,
-               bool ecc);
-
-int persistent_ram_write(struct persistent_ram_zone *prz, const void *s,
-       unsigned int count);
-
-size_t persistent_ram_old_size(struct persistent_ram_zone *prz);
-void *persistent_ram_old(struct persistent_ram_zone *prz);
-void persistent_ram_free_old(struct persistent_ram_zone *prz);
-ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz,
-       char *str, size_t len);
-
-#endif
index 74c0e70..b39c24c 100644 (file)
 #include <linux/console.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/persistent_ram.h>
 #include <linux/platform_device.h>
 #include <linux/proc_fs.h>
 #include <linux/string.h>
 #include <linux/uaccess.h>
 #include <linux/io.h>
 
-#include "persistent_ram.h"
 #include "ram_console.h"
 
 static struct persistent_ram_zone *ram_console_zone;