From: Siva Durga Prasad Paladugu Date: Mon, 11 Jan 2016 07:00:41 +0000 (+0530) Subject: fpga: xilinx: Check for substring in device ID validation X-Git-Tag: v2016.03-rc1~46^2~49 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f72132673a01216e760864e442f168977cce2bd2;p=u-boot fpga: xilinx: Check for substring in device ID validation Check for substrings in deviceID validation check so that it can support xa bitstreams also. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c index c765a74a25..d459a2f7a5 100644 --- a/drivers/fpga/xilinx.c +++ b/drivers/fpga/xilinx.c @@ -75,8 +75,8 @@ int fpga_loadbitstream(int devnum, char *fpgadata, size_t size, buffer[i] = *dataptr++; if (xdesc->name) { - i = strncmp(buffer, xdesc->name, strlen(xdesc->name)); - if (i) { + i = (ulong)strstr(buffer, xdesc->name); + if (!i) { printf("%s: Wrong bitstream ID for this device\n", __func__); printf("%s: Bitstream ID %s, current device ID %d/%s\n",