From: Imre Deak Date: Mon, 5 Apr 2010 21:49:06 +0000 (+0300) Subject: gpu: pvr: remove unused function args from PVRSRVSetDevicePowerStateKM X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=954614384a3af67fd6deb1eb99d836f34de102fb;p=sgx.git gpu: pvr: remove unused function args from PVRSRVSetDevicePowerStateKM The CallerID parameter was anyway a horrible concept in terms of understanding what the function is supposed to do when ISR_ID, KERNEL_ID or TIMER_ID is passed. Function arguments should never have such "high level" meaning, but rather denote much more concrete things. In this case for example whether we should mutex_lock() or mutex_trylock() for a certain lock. Better yet we should have separate functions for the two cases to keep the function body as simple as possible. Happily the CallerID and RetainMutex arguments are unused now, so they can be removed. Signed-off-by: Imre Deak CC: Mark Underwood CC: Mark Riding Reviewed-by: Topi Pohjolainen Reviewed-by: Ville Syrjälä --- diff --git a/pvr/power.c b/pvr/power.c index 8a0821e..a33e0de 100644 --- a/pvr/power.c +++ b/pvr/power.c @@ -208,8 +208,7 @@ static enum PVRSRV_ERROR PVRSRVDevicePostPowerStateKM(IMG_BOOL bAllDevices, } enum PVRSRV_ERROR PVRSRVSetDevicePowerStateKM(u32 ui32DeviceIndex, - enum PVR_POWER_STATE eNewPowerState, - u32 ui32CallerID, IMG_BOOL bRetainMutex) + enum PVR_POWER_STATE eNewPowerState) { enum PVRSRV_ERROR eError; struct SYS_DATA *psSysData; diff --git a/pvr/power.h b/pvr/power.h index 53dd6a3..a5d00e2 100644 --- a/pvr/power.h +++ b/pvr/power.h @@ -61,8 +61,7 @@ enum PVRSRV_ERROR PVRSRVSetInitServerState(enum PVRSRV_INIT_SERVER_STATE IMG_BOOL bState); enum PVRSRV_ERROR PVRSRVSetDevicePowerStateKM(u32 ui32DeviceIndex, - enum PVR_POWER_STATE eNewPowerState, u32 ui32CallerID, - IMG_BOOL bRetainMutex); + enum PVR_POWER_STATE eNewPowerState); enum PVRSRV_ERROR PVRSRVSystemPrePowerStateKM( enum PVR_POWER_STATE eNewPowerState); diff --git a/pvr/pvr_debug.c b/pvr/pvr_debug.c index b3a05a2..469d522 100644 --- a/pvr/pvr_debug.c +++ b/pvr/pvr_debug.c @@ -289,8 +289,7 @@ static int pvr_dbg_reset(void *data, u64 val) } err = PVRSRVSetDevicePowerStateKM(node->sDevId.ui32DeviceIndex, - PVRSRV_POWER_STATE_D0, - KERNEL_ID, IMG_TRUE); + PVRSRV_POWER_STATE_D0); if (err != PVRSRV_OK) { r = -EIO; goto exit; diff --git a/pvr/pvrsrv.c b/pvr/pvrsrv.c index 2a11fe6..30d9c63 100644 --- a/pvr/pvrsrv.c +++ b/pvr/pvrsrv.c @@ -316,10 +316,9 @@ enum PVRSRV_ERROR PVRSRVFinaliseSystem(IMG_BOOL bInitSuccessful) psDeviceNode = psSysData->psDeviceNodeList; while (psDeviceNode) { eError = - PVRSRVSetDevicePowerStateKM(psDeviceNode->sDevId. - ui32DeviceIndex, - PVRSRV_POWER_Unspecified, - KERNEL_ID, IMG_FALSE); + PVRSRVSetDevicePowerStateKM( + psDeviceNode->sDevId.ui32DeviceIndex, + PVRSRV_POWER_Unspecified); if (eError != PVRSRV_OK) PVR_DPF(PVR_DBG_ERROR, "PVRSRVFinaliseSystem: " "Failed PVRSRVSetDevicePowerStateKM " @@ -439,8 +438,7 @@ enum PVRSRV_ERROR PVRSRVDeinitialiseDevice(u32 ui32DevIndex) FoundDevice: eError = PVRSRVSetDevicePowerStateKM(ui32DevIndex, - PVRSRV_POWER_STATE_D3, - KERNEL_ID, IMG_FALSE); + PVRSRV_POWER_STATE_D3); if (eError != PVRSRV_OK) { PVR_DPF(PVR_DBG_ERROR, "PVRSRVDeinitialiseDevice: " "Failed PVRSRVSetDevicePowerStateKM call"); diff --git a/pvr/sgxinit.c b/pvr/sgxinit.c index a84c7ee..5fa2e0f 100644 --- a/pvr/sgxinit.c +++ b/pvr/sgxinit.c @@ -911,8 +911,7 @@ static void SGX_MISRHandler(void *pvData) * released when returning from the function. */ dev_idx = psDeviceNode->sDevId.ui32DeviceIndex; - err = PVRSRVSetDevicePowerStateKM(dev_idx, PVRSRV_POWER_STATE_D0, - ISR_ID, IMG_FALSE); + err = PVRSRVSetDevicePowerStateKM(dev_idx, PVRSRV_POWER_STATE_D0); BUG_ON(err != PVRSRV_OK); l1 = readl(&psSGXHostCtl->ui32InterruptFlags); diff --git a/pvr/sgxutils.c b/pvr/sgxutils.c index aac6d51..beb8a57 100644 --- a/pvr/sgxutils.c +++ b/pvr/sgxutils.c @@ -89,10 +89,9 @@ void SGXTestActivePowerEvent(struct PVRSRV_DEVICE_NODE *psDeviceNode, PDUMPSUSPEND(); - eError = PVRSRVSetDevicePowerStateKM(psDeviceNode->sDevId. - ui32DeviceIndex, - PVRSRV_POWER_STATE_D3, - ui32CallerID, IMG_FALSE); + eError = PVRSRVSetDevicePowerStateKM( + psDeviceNode->sDevId.ui32DeviceIndex, + PVRSRV_POWER_STATE_D3); if (eError == PVRSRV_OK) SGXPostActivePowerEvent(psDeviceNode, ui32CallerID); if (eError == PVRSRV_ERROR_RETRY) { @@ -269,8 +268,7 @@ enum PVRSRV_ERROR SGXScheduleCCBCommandKM( eError = PVRSRVSetDevicePowerStateKM(psDeviceNode->sDevId.ui32DeviceIndex, - PVRSRV_POWER_STATE_D0, ui32CallerID, - IMG_TRUE); + PVRSRV_POWER_STATE_D0); PDUMPRESUME();