Skip to content

Commit

Permalink
staging: ti dspbridge: Rename words with camel case.
Browse files Browse the repository at this point in the history
The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
pdwSize to buff_size
pdwState to board_state
pdwValue to value
pdwVersion to version
pElemExisting to elem_existing
pEntry to entry
pExists to exists
pfEnablePerf to enable_perf
pGenObj to gen_obj
phChnlMgr to channel_mgr
phChnl to chnl
phCodMgr to cod_mgr
phDCDHandle to dcd_handle
phDcdMgr to dcd_mgr
phDehMgr to deh_manager
========================================

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Rene Sapiens authored and Greg Kroah-Hartman committed Jul 22, 2010
1 parent aa09b09 commit a512027
Show file tree
Hide file tree
Showing 20 changed files with 182 additions and 179 deletions.
18 changes: 9 additions & 9 deletions drivers/staging/tidspbridge/core/chnl_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ int bridge_chnl_close(struct chnl_object *chnl_obj)
* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given board.
*/
int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs)
{
Expand All @@ -389,7 +389,7 @@ int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
u8 max_channels;

/* Check DBC requirements: */
DBC_REQUIRE(phChnlMgr != NULL);
DBC_REQUIRE(channel_mgr != NULL);
DBC_REQUIRE(pMgrAttrs != NULL);
DBC_REQUIRE(pMgrAttrs->max_channels > 0);
DBC_REQUIRE(pMgrAttrs->max_channels <= CHNL_MAXCHANNELS);
Expand Down Expand Up @@ -430,10 +430,10 @@ int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,

if (DSP_FAILED(status)) {
bridge_chnl_destroy(chnl_mgr_obj);
*phChnlMgr = NULL;
*channel_mgr = NULL;
} else {
/* Return channel manager object to caller... */
*phChnlMgr = chnl_mgr_obj;
*channel_mgr = chnl_mgr_obj;
}
return status;
}
Expand Down Expand Up @@ -774,7 +774,7 @@ int bridge_chnl_idle(struct chnl_object *chnl_obj, u32 timeout,
* ======== bridge_chnl_open ========
* Open a new half-duplex channel to the DSP board.
*/
int bridge_chnl_open(OUT struct chnl_object **phChnl,
int bridge_chnl_open(OUT struct chnl_object **chnl,
struct chnl_mgr *hchnl_mgr, s8 chnl_mode,
u32 uChnlId, CONST IN struct chnl_attr *pattrs)
{
Expand All @@ -783,10 +783,10 @@ int bridge_chnl_open(OUT struct chnl_object **phChnl,
struct chnl_object *pchnl = NULL;
struct sync_object *sync_event = NULL;
/* Ensure DBC requirements: */
DBC_REQUIRE(phChnl != NULL);
DBC_REQUIRE(chnl != NULL);
DBC_REQUIRE(pattrs != NULL);
DBC_REQUIRE(hchnl_mgr != NULL);
*phChnl = NULL;
*chnl = NULL;
/* Validate Args: */
if (pattrs->uio_reqs == 0) {
status = -EINVAL;
Expand Down Expand Up @@ -893,10 +893,10 @@ int bridge_chnl_open(OUT struct chnl_object **phChnl,
spin_unlock_bh(&chnl_mgr_obj->chnl_mgr_lock);
/* Return result... */
pchnl->dw_state = CHNL_STATEREADY;
*phChnl = pchnl;
*chnl = pchnl;
}
func_end:
DBC_ENSURE((DSP_SUCCEEDED(status) && pchnl) || (*phChnl == NULL));
DBC_ENSURE((DSP_SUCCEEDED(status) && pchnl) || (*chnl == NULL));
return status;
}

Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/tidspbridge/core/tiomap3430.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static int bridge_brd_read(struct bridge_dev_context *dev_context,
static int bridge_brd_start(struct bridge_dev_context *dev_context,
u32 dsp_addr);
static int bridge_brd_status(struct bridge_dev_context *dev_context,
int *pdwState);
int *board_state);
static int bridge_brd_stop(struct bridge_dev_context *dev_context);
static int bridge_brd_write(struct bridge_dev_context *dev_context,
IN u8 *host_buff,
Expand Down Expand Up @@ -753,10 +753,10 @@ static int bridge_brd_delete(struct bridge_dev_context *dev_ctxt)
* Returns the board status.
*/
static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
int *pdwState)
int *board_state)
{
struct bridge_dev_context *dev_context = dev_ctxt;
*pdwState = dev_context->dw_brd_state;
*board_state = dev_context->dw_brd_state;
return 0;
}

Expand Down
30 changes: 15 additions & 15 deletions drivers/staging/tidspbridge/include/dspbridge/cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ extern int cfg_get_auto_start(IN struct cfg_devnode *dev_node_obj,
* Purpose:
* Retrieves the version of the PM Class Driver.
* Parameters:
* pdwVersion: Ptr to u32 to contain version number upon return.
* version: Ptr to u32 to contain version number upon return.
* Returns:
* 0: Success. pdwVersion contains Class Driver version in
* 0: Success. version contains Class Driver version in
* the form: 0xAABBCCDD where AABB is Major version and
* CCDD is Minor.
* -EPERM: Failure.
* Requires:
* CFG initialized.
* Ensures:
* 0: Success.
* else: *pdwVersion is NULL.
* else: *version is NULL.
*/
extern int cfg_get_cd_version(OUT u32 *pdwVersion);
extern int cfg_get_cd_version(OUT u32 *version);

/*
* ======== cfg_get_dev_object ========
Expand All @@ -79,19 +79,19 @@ extern int cfg_get_cd_version(OUT u32 *pdwVersion);
* Parameters:
* dev_node_obj: Platform's dev_node handle from which to retrieve
* value.
* pdwValue: Ptr to location to store the value.
* value: Ptr to location to store the value.
* Returns:
* 0: Success.
* -EFAULT: dev_node_obj is invalid or phDevObject is invalid.
* -ENODATA: The resource is not available.
* Requires:
* CFG initialized.
* Ensures:
* 0: *pdwValue is set to the retrieved u32.
* else: *pdwValue is set to 0L.
* 0: *value is set to the retrieved u32.
* else: *value is set to 0L.
*/
extern int cfg_get_dev_object(IN struct cfg_devnode *dev_node_obj,
OUT u32 *pdwValue);
OUT u32 *value);

/*
* ======== cfg_get_exec_file ========
Expand Down Expand Up @@ -120,33 +120,33 @@ extern int cfg_get_exec_file(IN struct cfg_devnode *dev_node_obj,
* Purpose:
* Retrieve the Driver Object handle From the Registry
* Parameters:
* pdwValue: Ptr to location to store the value.
* value: Ptr to location to store the value.
* dw_type Type of Object to Get
* Returns:
* 0: Success.
* Requires:
* CFG initialized.
* Ensures:
* 0: *pdwValue is set to the retrieved u32(non-Zero).
* else: *pdwValue is set to 0L.
* 0: *value is set to the retrieved u32(non-Zero).
* else: *value is set to 0L.
*/
extern int cfg_get_object(OUT u32 *pdwValue, u8 dw_type);
extern int cfg_get_object(OUT u32 *value, u8 dw_type);

/*
* ======== cfg_get_perf_value ========
* Purpose:
* Retrieve a flag indicating whether PERF should log statistics for the
* PM class driver.
* Parameters:
* pfEnablePerf: Location to store flag. 0 indicates the key was
* enable_perf: Location to store flag. 0 indicates the key was
* not found, or had a zero value. A nonzero value
* means the key was found and had a nonzero value.
* Returns:
* Requires:
* pfEnablePerf != NULL;
* enable_perf != NULL;
* Ensures:
*/
extern void cfg_get_perf_value(OUT bool *pfEnablePerf);
extern void cfg_get_perf_value(OUT bool *enable_perf);

/*
* ======== cfg_get_zl_file ========
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/tidspbridge/include/dspbridge/chnl.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern int chnl_close(struct chnl_object *chnl_obj);
* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given board.
* Parameters:
* phChnlMgr: Location to store a channel manager object on output.
* channel_mgr: Location to store a channel manager object on output.
* hdev_obj: Handle to a device object.
* pMgrAttrs: Channel manager attributes.
* pMgrAttrs->max_channels: Max channels
Expand All @@ -70,14 +70,14 @@ extern int chnl_close(struct chnl_object *chnl_obj);
* -EEXIST: Channel manager already exists for this device.
* Requires:
* chnl_init(void) called.
* phChnlMgr != NULL.
* channel_mgr != NULL.
* pMgrAttrs != NULL.
* Ensures:
* 0: Subsequent calls to chnl_create() for the same
* board without an intervening call to
* chnl_destroy() will fail.
*/
extern int chnl_create(OUT struct chnl_mgr **phChnlMgr,
extern int chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs);

Expand Down
12 changes: 6 additions & 6 deletions drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@ extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
* This function creates a DCD module manager.
* Parameters:
* pszZlDllName: Pointer to a DLL name string.
* phDcdMgr: A pointer to a DCD manager handle.
* dcd_mgr: A pointer to a DCD manager handle.
* Returns:
* 0: Success.
* -ENOMEM: Unable to allocate memory for DCD manager handle.
* -EPERM: General failure.
* Requires:
* DCD initialized.
* pszZlDllName is non-NULL.
* phDcdMgr is non-NULL.
* dcd_mgr is non-NULL.
* Ensures:
* A DCD manager handle is created.
*/
extern int dcd_create_manager(IN char *pszZlDllName,
OUT struct dcd_manager **phDcdMgr);
OUT struct dcd_manager **dcd_mgr);

/*
* ======== dcd_destroy_manager ========
Expand Down Expand Up @@ -215,7 +215,7 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* uuid_obj: Pointer to a dsp_uuid that represents a unique DSP/BIOS
* Bridge object.
* pstrLibName: Buffer to hold library name.
* pdwSize: Contains buffer size. Set to string size on output.
* buff_size: Contains buffer size. Set to string size on output.
* phase: Which phase to load
* phase_split: Are phases in multiple libraries
* Returns:
Expand All @@ -226,13 +226,13 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* Valid hdcd_mgr.
* pstrLibName != NULL.
* uuid_obj != NULL
* pdwSize != NULL.
* buff_size != NULL.
* Ensures:
*/
extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
IN OUT char *pstrLibName,
IN OUT u32 *pdwSize,
IN OUT u32 *buff_size,
IN enum nldr_phase phase,
OUT bool *phase_split);

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/tidspbridge/include/dspbridge/dbll.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern int dbll_get_sect(struct dbll_library_obj *lib, char *name,
extern bool dbll_init(void);
extern int dbll_load(struct dbll_library_obj *lib,
dbll_flags flags,
struct dbll_attrs *attrs, u32 * pEntry);
struct dbll_attrs *attrs, u32 * entry);
extern int dbll_load_sect(struct dbll_library_obj *lib,
char *sectName, struct dbll_attrs *attrs);
extern int dbll_open(struct dbll_tar_obj *target, char *file,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ typedef bool(*dbll_init_fxn) (void);
* Requires:
* DBL initialized.
* Valid lib.
* pEntry != NULL.
* entry != NULL.
* Ensures:
*/
typedef int(*dbll_load_fxn) (struct dbll_library_obj *lib,
Expand Down
20 changes: 10 additions & 10 deletions drivers/staging/tidspbridge/include/dspbridge/dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,39 +263,39 @@ extern int dev_get_dmm_mgr(struct dev_object *hdev_obj,
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
* *phCodMgr: Ptr to location to store handle.
* *cod_mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
* phCodMgr != NULL.
* cod_mgr != NULL.
* DEV Initialized.
* Ensures:
* 0: *phCodMgr contains a handle to a COD manager object.
* else: *phCodMgr is NULL.
* 0: *cod_mgr contains a handle to a COD manager object.
* else: *cod_mgr is NULL.
*/
extern int dev_get_cod_mgr(struct dev_object *hdev_obj,
OUT struct cod_manager **phCodMgr);
OUT struct cod_manager **cod_mgr);

/*
* ======== dev_get_deh_mgr ========
* Purpose:
* Retrieve the DEH manager created for this device.
* Parameters:
* hdev_obj: Handle to device object created with dev_create_device().
* *phDehMgr: Ptr to location to store handle.
* *deh_manager: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
* phDehMgr != NULL.
* deh_manager != NULL.
* DEH Initialized.
* Ensures:
* 0: *phDehMgr contains a handle to a DEH manager object.
* else: *phDehMgr is NULL.
* 0: *deh_manager contains a handle to a DEH manager object.
* else: *deh_manager is NULL.
*/
extern int dev_get_deh_mgr(struct dev_object *hdev_obj,
OUT struct deh_mgr **phDehMgr);
OUT struct deh_mgr **deh_manager);

/*
* ======== dev_get_dev_node ========
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
#ifndef DSPCHNL_
#define DSPCHNL_

extern int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
extern int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs
*pMgrAttrs);

extern int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr);

extern int bridge_chnl_open(OUT struct chnl_object **phChnl,
extern int bridge_chnl_open(OUT struct chnl_object **chnl,
struct chnl_mgr *hchnl_mgr,
s8 chnl_mode,
u32 uChnlId,
Expand Down
Loading

0 comments on commit a512027

Please sign in to comment.