ENGR00305067-2 media: v4l2: mxc pxp output: Weaken fb id check
authorLiu Ying <Ying.Liu@freescale.com>
Tue, 25 Mar 2014 05:58:17 +0000 (13:58 +0800)
committerNitin Garg <nitin.garg@freescale.com>
Wed, 16 Apr 2014 13:58:07 +0000 (08:58 -0500)
This patch uses strncmp() to replace strcmp() to weaken framebuffer
id check so that the mxs framebuffer driver may use different names
for standalone framebuffers.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c

index dc078320acb0133c039d1075c4fc0af6dcb2a902..68f601eefa5344418fbc398794d98a5319465669 100644 (file)
@@ -265,7 +265,7 @@ static int _get_fbinfo(struct fb_info **fbi)
        int i;
        for (i = 0; i < num_registered_fb; i++) {
                char *idstr = registered_fb[i]->fix.id;
-               if (strcmp(idstr, "mxs") == 0) {
+               if (strncmp(idstr, "mxs", 3) == 0) {
                        *fbi = registered_fb[i];
                        return 0;
                }