From 0e440b93e02febfbf485f178d01c35e34e4917d8 Mon Sep 17 00:00:00 2001 From: Andrei-Liviu Simion Date: Fri, 9 Oct 2015 03:51:41 -0700 Subject: [PATCH] hdcp1x: Define number of instances if not defined. Some subsystem drivers have dependencies on all subcore drivers. If no subcore of that type is present, the HDCP subcore driver's TCL file won't be executing, and the XPAR_XHDCP_NUM_INSTANCES will remain undefined. This will cause a compilation error due to XHdcp1x_LookupConfig using this definition. This patch protects against such a scenario. Signed-off-by: Andrei-Liviu Simion Acked-by: Shadul Shaikh --- XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_sinit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_sinit.c b/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_sinit.c index 4cc61f1a..98815907 100644 --- a/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_sinit.c +++ b/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_sinit.c @@ -56,6 +56,10 @@ /************************** Constant Definitions *****************************/ +#ifndef XPAR_XHDCP_NUM_INSTANCES +#define XPAR_XHDCP_NUM_INSTANCES 0 +#endif + /***************** Macros (Inline Functions) Definitions *********************/ /**************************** Type Definitions *******************************/