From 37cd50e9ff059360da2d8d09b93a2a5618ad95d7 Mon Sep 17 00:00:00 2001 From: Matt Sealey Date: Thu, 19 Apr 2012 13:59:01 -0500 Subject: [PATCH] siihdmi: strncmp against modedb instead of structure memcmp to save time and effort matching CEA VIC --- drivers/video/mxc/siihdmi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/video/mxc/siihdmi.c b/drivers/video/mxc/siihdmi.c index 11aa4835249..3dd24004e32 100644 --- a/drivers/video/mxc/siihdmi.c +++ b/drivers/video/mxc/siihdmi.c @@ -678,7 +678,11 @@ static int siihdmi_find_vic_from_modedb(const struct fb_videomode *mode) for (vic = 1; vic <= 64; vic++) { - if (!memcmp((void *)&cea_modes[vic], (void *)mode, sizeof(struct fb_videomode))) + /* for comment's sake, "CEA VIC nn" is 10 characters + * watch out porting this as it relies the CEA VIC nn string + * to be in the modedb + */ + if (!strncmp(cea_modes[vic].name, mode->name, 10)) return vic; } return 0;