From a679f36152dab84e9187572b2a3e193ddd95f58d Mon Sep 17 00:00:00 2001 From: Omar Ramirez Luna Date: Thu, 10 Jan 2013 03:37:02 -0600 Subject: [PATCH] staging: tidspbridge: remove unused code to handle iva_img There is no way to specify the value of iva_img and since this code is not being used, remove it. This analysis resulted from a report by Chen Gang , mentioning that the existing code was wrongly specifying the size to be copied. Signed-off-by: Omar Ramirez Luna Signed-off-by: Greg Kroah-Hartman --- drivers/staging/tidspbridge/include/dspbridge/proc.h | 2 -- drivers/staging/tidspbridge/rmgr/drv_interface.c | 1 - drivers/staging/tidspbridge/rmgr/proc.c | 4 ---- 3 files changed, 7 deletions(-) diff --git a/drivers/staging/tidspbridge/include/dspbridge/proc.h b/drivers/staging/tidspbridge/include/dspbridge/proc.h index 851b356d7a51..774a3f6ff201 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/proc.h +++ b/drivers/staging/tidspbridge/include/dspbridge/proc.h @@ -23,8 +23,6 @@ #include #include -extern char *iva_img; - /* * ======== proc_attach ======== * Purpose: diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c index e6f31d817d6b..df0f37ea1ee5 100644 --- a/drivers/staging/tidspbridge/rmgr/drv_interface.c +++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c @@ -65,7 +65,6 @@ static struct class *bridge_class; static u32 driver_context; static s32 driver_major; static char *base_img; -char *iva_img; static s32 shm_size = 0x500000; /* 5 MB */ static int tc_wordswapon; /* Default value is always false */ #ifdef CONFIG_TIDSPBRIDGE_RECOVERY diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c index ac016edc579f..e1bdf6eacb3a 100644 --- a/drivers/staging/tidspbridge/rmgr/proc.c +++ b/drivers/staging/tidspbridge/rmgr/proc.c @@ -382,7 +382,6 @@ static int get_exec_file(struct cfg_devnode *dev_node_obj, u32 size, char *exec_file) { u8 dev_type; - s32 len; struct drv_data *drv_datap = dev_get_drvdata(bridge); dev_get_dev_type(hdev_obj, (u8 *) &dev_type); @@ -398,9 +397,6 @@ static int get_exec_file(struct cfg_devnode *dev_node_obj, return -EINVAL; strcpy(exec_file, drv_datap->base_img); - } else if (dev_type == IVA_UNIT && iva_img) { - len = strlen(iva_img); - strncpy(exec_file, iva_img, len + 1); } else { return -ENOENT; } -- 2.39.5