dp: Set all instance structure values to 0.
Parts of the driver check whether or not the function pointers are set and call appropriate callbacks if they are. Ensure function pointers are set to 0 / NULL during configuration initialization. Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com> Acked-by: Shadul Shaikh <shaduls@xilinx.com>
This commit is contained in:
parent
6881673da5
commit
a1f01dfd16
1 changed files with 2 additions and 1 deletions
|
@ -57,6 +57,7 @@
|
|||
|
||||
/******************************* Include Files ********************************/
|
||||
|
||||
#include <string.h>
|
||||
#include "xdp.h"
|
||||
#if defined(__arm__)
|
||||
#include "sleep.h"
|
||||
|
@ -173,7 +174,7 @@ void XDp_CfgInitialize(XDp *InstancePtr, XDp_Config *ConfigPtr,
|
|||
Xil_AssertVoid(ConfigPtr != NULL);
|
||||
Xil_AssertVoid(EffectiveAddr != 0x0);
|
||||
|
||||
InstancePtr->IsReady = 0;
|
||||
memset(InstancePtr, 0, sizeof(XDp));
|
||||
|
||||
InstancePtr->Config = *ConfigPtr;
|
||||
InstancePtr->Config.BaseAddr = EffectiveAddr;
|
||||
|
|
Loading…
Add table
Reference in a new issue