currently pConstraint value is a pointer which is dereferenced twice(when debug is enabled) to get to the opp index. instead dereference it correctly once. since the meaning of the variable changes, rename it as opp_idx
Cc: Ameya Palande <[email protected]> Cc: Deepak Chitriki <[email protected]> Cc: Felipe Contreras <[email protected]> Cc: Hiroshi Doyu <[email protected]> Cc: Omar Ramirez Luna <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> --- drivers/dsp/bridge/wmd/tiomap3430_pwr.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c index 084f406..5dfbef8 100644 --- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c +++ b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c @@ -66,18 +66,20 @@ DSP_STATUS handle_constraints_set(struct WMD_DEV_CONTEXT *pDevContext, IN void *pArgs) { #ifdef CONFIG_BRIDGE_DVFS - u32 *pConstraintVal; + u32 opp_idx; struct dspbridge_platform_data *pdata = omap_dspbridge_dev->dev.platform_data; - pConstraintVal = (u32 *)(pArgs); + /* pick up the opp index */ + opp_idx = *(((u32 *)(pArgs)) + 1); + /* Read the target value requested by DSP */ DBG_Trace(DBG_LEVEL7, "handle_constraints_set:" - "opp requested = 0x%x\n", (u32)*(pConstraintVal+1)); + "opp requested = 0x%x\n", opp_idx); /* Set the new opp value */ if (pdata->dsp_set_min_opp) - (*pdata->dsp_set_min_opp)((u32)*(pConstraintVal+1)); + (*pdata->dsp_set_min_opp)(opp_idx); #endif /* #ifdef CONFIG_BRIDGE_DVFS */ return DSP_SOK; } -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
