diff options
| author | Min Kuang <min.kuang@mediatek.com> | 2015-11-12 06:55:55 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2016-12-25 12:55:40 +0100 |
| commit | 52c45c8da818116e7a8807144ddfac4ad083bce1 (patch) | |
| tree | b7a582a12dd33c63a34212b750c1fba28b94d1b5 /drivers | |
| parent | fbcf666fc6fd40d29a777d1fd1e340a89ca623a7 (diff) | |
AEE: remove filp_open call
Remove filp_open call and defeature related feature
BUG=23460645
Change-Id: Ifa385249525fb4a7a14a6626ea3ca291fefdebc7
CR-Id:ALPS02341920
Signed-off-by: Min Kuang <min.kuang@mediatek.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/misc/mediatek/aee/ipanic/Makefile | 1 | ||||
| -rw-r--r-- | drivers/misc/mediatek/aee/ipanic/ipanic_vfs.c | 28 | ||||
| -rw-r--r-- | drivers/misc/mediatek/ram_console/mtk_ram_console.c | 51 |
3 files changed, 0 insertions, 80 deletions
diff --git a/drivers/misc/mediatek/aee/ipanic/Makefile b/drivers/misc/mediatek/aee/ipanic/Makefile index 2445565f0..63fcd13cd 100644 --- a/drivers/misc/mediatek/aee/ipanic/Makefile +++ b/drivers/misc/mediatek/aee/ipanic/Makefile @@ -7,5 +7,4 @@ else ipanic-y += ipanic_mtd.o endif -ipanic-y += ipanic_vfs.o ipanic-y += ipanic_pstore.o diff --git a/drivers/misc/mediatek/aee/ipanic/ipanic_vfs.c b/drivers/misc/mediatek/aee/ipanic/ipanic_vfs.c deleted file mode 100644 index ee9c4d189..000000000 --- a/drivers/misc/mediatek/aee/ipanic/ipanic_vfs.c +++ /dev/null @@ -1,28 +0,0 @@ -#include <linux/file.h> -#include <linux/fs.h> -#include <uapi/asm-generic/fcntl.h> -#include <linux/err.h> -#include "ipanic.h" - - -struct file *expdb_open(void) -{ - static struct file *filp_expdb; - if (!filp_expdb) - filp_expdb = filp_open(AEE_EXPDB_PATH, O_RDWR, 0); - if (IS_ERR(filp_expdb)) { - LOGD("filp_open(%s) for aee failed (%ld)\n", AEE_EXPDB_PATH, PTR_ERR(filp_expdb)); - } - return filp_expdb; -} - -ssize_t expdb_write(struct file *filp, const char *buf, size_t len, loff_t *off) -{ - return kernel_write(filp, buf, len, off); -} - -ssize_t expdb_read(struct file *filp, char *buf, size_t len, loff_t *off) -{ - return kernel_read(filp, off, buf, len); -} - diff --git a/drivers/misc/mediatek/ram_console/mtk_ram_console.c b/drivers/misc/mediatek/ram_console/mtk_ram_console.c index 6507a3245..4f5ee935b 100644 --- a/drivers/misc/mediatek/ram_console/mtk_ram_console.c +++ b/drivers/misc/mediatek/ram_console/mtk_ram_console.c @@ -205,57 +205,6 @@ static const struct file_operations ram_console2_file_ops = { .release = single_release, }; -static int emmc_read_last_kmsg(void *data) -{ - int ret; - struct file *filp; - - struct proc_dir_entry *entry; - struct ram_console_buffer *bufp = NULL; - int timeout = 0; - - ram_console2_log = kzalloc(ram_console_buffer->sz_buffer, GFP_KERNEL); - if (ram_console2_log == NULL) { - pr_err("ram_console: malloc size 2 error!\n"); - return 1; - } - - do { - filp = expdb_open(); - if (timeout++ > 60) { - pr_err("ram_console: open expdb partition error [%ld]!\n", PTR_ERR(filp)); - return 1; - } - msleep(500); - } while (IS_ERR(filp)); - ret = kernel_read(filp, EMMC_ADDR, ram_console2_log, ram_console_buffer->sz_buffer); - fput(filp); - if (IS_ERR(ERR_PTR(ret))) { - kfree(ram_console2_log); - ram_console2_log = NULL; - pr_err("ram_console: read emmc data 2 error!\n"); - return 1; - } - - bufp = (struct ram_console_buffer *)ram_console2_log; - if (bufp->sig != REBOOT_REASON_SIG) { - kfree(ram_console2_log); - ram_console2_log = NULL; - pr_err("ram_console: emmc read data sig is not match!\n"); - return 1; - } - - entry = proc_create("last_kmsg2", 0444, NULL, &ram_console2_file_ops); - if (!entry) { - pr_err("ram_console: failed to create proc entry\n"); - kfree(ram_console2_log); - ram_console2_log = NULL; - return 1; - } - pr_err("ram_console: create last_kmsg2 ok.\n"); - return 0; - -} #else void last_kmsg_store_to_emmc(void) { |
