···610610 return 0;611611}612612613613+static const char * const strings[] = {614614+ "samsung,exynos3",615615+ "samsung,exynos4",616616+ "samsung,exynos5",617617+};618618+613619static struct platform_driver exynos_drm_platform_driver = {614620 .probe = exynos_drm_platform_probe,615621 .remove = exynos_drm_platform_remove,···628622629623static int exynos_drm_init(void)630624{625625+ bool is_exynos = false;631626 int ret, i, j;632627633628 /*···638631 * by Exynos drm driver when using multi-platform kernel.639632 * So these codes will be replaced with more generic way later.640633 */641641- if (!of_machine_is_compatible("samsung,exynos3") &&642642- !of_machine_is_compatible("samsung,exynos4") &&643643- !of_machine_is_compatible("samsung,exynos5"))634634+ for (i = 0; i < ARRAY_SIZE(strings); i++) {635635+ if (of_machine_is_compatible(strings[i])) {636636+ is_exynos = true;637637+ break;638638+ }639639+ }640640+641641+ if (!is_exynos)644642 return -ENODEV;645643646644 exynos_drm_pdev = platform_device_register_simple("exynos-drm", -1,