[PATCH 03/11] staging: tidspbridge: Remove cfg_get_auto_start()

From: Ivan Gomez Castellanos
Date: Wed Aug 25 2010 - 18:16:35 EST


As the services directory is going to be removed, this patch is needed.

The function cfg_get_auto_start() only assigns a value to the flag
tmp, and it is only called by the function api_init_complete2(). So
the function cfg_get_auto_start() is not required.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@xxxxxx>
---
.../staging/tidspbridge/include/dspbridge/cfg.h | 19 --------------
drivers/staging/tidspbridge/pmgr/dspapi.c | 10 ++++---
drivers/staging/tidspbridge/services/cfg.c | 26 --------------------
3 files changed, 6 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index 05a8999..a84fa2b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -35,25 +35,6 @@
extern void cfg_exit(void);

/*
- * ======== cfg_get_auto_start ========
- * Purpose:
- * Retreive the autostart mask, if any, for this board.
- * Parameters:
- * dev_node_obj: Handle to the dev_node who's driver we are querying.
- * auto_start: Ptr to location for 32 bit autostart mask.
- * Returns:
- * 0: Success.
- * -EFAULT: dev_node_obj is invalid.
- * -ENODATA: Unable to retreive resource.
- * Requires:
- * CFG initialized.
- * Ensures:
- * 0: *auto_start contains autostart mask for this devnode.
- */
-extern int cfg_get_auto_start(struct cfg_devnode *dev_node_obj,
- u32 *auto_start);
-
-/*
* ======== cfg_get_cd_version ========
* Purpose:
* Retrieves the version of the PM Class Driver.
diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c
index 7b42f72..d9bb3ea 100644
--- a/drivers/staging/tidspbridge/pmgr/dspapi.c
+++ b/drivers/staging/tidspbridge/pmgr/dspapi.c
@@ -381,8 +381,8 @@ int api_init_complete2(void)
int status = 0;
struct cfg_devnode *dev_node;
struct dev_object *hdev_obj;
+ struct drv_data *drv_datap;
u8 dev_type;
- u32 tmp;

DBC_REQUIRE(api_c_refs > 0);

@@ -397,10 +397,12 @@ int api_init_complete2(void)
if (dev_get_dev_type(hdev_obj, &dev_type))
continue;

- if ((dev_type == DSP_UNIT) || (dev_type == IVA_UNIT))
- if (cfg_get_auto_start(dev_node, &tmp) == 0
- && tmp)
+ if ((dev_type == DSP_UNIT) || (dev_type == IVA_UNIT)) {
+ drv_datap = dev_get_drvdata(bridge);
+
+ if (drv_datap && drv_datap->base_img)
proc_auto_start(dev_node, hdev_obj);
+ }
}

return status;
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index a7af74f..e9cdbf6 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -46,32 +46,6 @@ void cfg_exit(void)
}

/*
- * ======== cfg_get_auto_start ========
- * Purpose:
- * Retreive the autostart mask, if any, for this board.
- */
-int cfg_get_auto_start(struct cfg_devnode *dev_node_obj,
- u32 *auto_start)
-{
- int status = 0;
- u32 dw_buf_size;
- struct drv_data *drv_datap = dev_get_drvdata(bridge);
-
- dw_buf_size = sizeof(*auto_start);
- if (!dev_node_obj)
- status = -EFAULT;
- if (!auto_start || !drv_datap)
- status = -EFAULT;
- if (!status)
- *auto_start = (drv_datap->base_img) ? 1 : 0;
-
- DBC_ENSURE((status == 0 &&
- (*auto_start == 0 || *auto_start == 1))
- || status != 0);
- return status;
-}
-
-/*
* ======== cfg_get_dev_object ========
* Purpose:
* Retrieve the Device Object handle for a given devnode.
--
1.7.0.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/