From patchwork Mon Dec 17 11:24:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13625 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D2EBF23E11 for ; Mon, 17 Dec 2012 11:31:51 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 84C5DA1970A for ; Mon, 17 Dec 2012 11:31:51 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so8862118ieb.11 for ; Mon, 17 Dec 2012 03:31:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:received-spf :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=UFALLsZjkVz5pX66OaJaYit6/2UYaTuSTMptjbhvTPk=; b=eAEf6HORvRCv0yC4MNKlRAjozC/mh94I+hxX5BNKfWtYs5kv9IaWysHD3FmwpAp/li pN1CRyV6fchD9HJZhgIEw8kQpIQ02hBzfR/gkYTVkFVzZH5r2HRtlDelXHM/1TAzfhDQ RRfuTityVf5mFOMwqc1ts+x/18IZueeghBU7rqOQ7q4W4phUqmYWFMX3684Dk95xSsmF YYFgoIhW2QM8cYgfiInMsdNbcASu8uC3+zKE/dhD5uz8rY4uUijBSkp6YDxBSowXNL9g xjbkRDQEHQ+mnXO7kYwZeUYXtMwkMM866jshc4ne2/teBA2CpYJ2OApsGSMjnnAThwMK SrNQ== X-Received: by 10.50.161.169 with SMTP id xt9mr8581023igb.62.1355743910896; Mon, 17 Dec 2012 03:31:50 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp67834igt; Mon, 17 Dec 2012 03:31:50 -0800 (PST) Received: by 10.66.76.6 with SMTP id g6mr41622409paw.61.1355743910371; Mon, 17 Dec 2012 03:31:50 -0800 (PST) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx.google.com with ESMTPS id zs4si12768257pbc.150.2012.12.17.03.31.50 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Dec 2012 03:31:50 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.46; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f46.google.com with SMTP id wy7so3554105pbc.5 for ; Mon, 17 Dec 2012 03:31:50 -0800 (PST) Received: by 10.68.242.38 with SMTP id wn6mr42522852pbc.28.1355743910103; Mon, 17 Dec 2012 03:31:50 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id kn3sm300177pbc.3.2012.12.17.03.31.46 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Dec 2012 03:31:49 -0800 (PST) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, patches@linaro.org, sachin.kamat@linaro.org Subject: [PATCH 2/3] ARM: EXYNOS: Fix NULL pointer dereference bug in SMDK4X12 Date: Mon, 17 Dec 2012 16:54:20 +0530 Message-Id: <1355743461-21535-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1355743461-21535-1-git-send-email-sachin.kamat@linaro.org> References: <1355743461-21535-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQnI+u5ZZJ6nNzjKH6LpZAdjRvt7LS+9JvZqZLFpXSJuDd67pYfNJrx/rJ/fBjbRPjVKFytt When DRM support for Samsung SoC and Samsung S3C framebuffer support are selected, the kernel crashes as it does not get the required platform data. Change the compile macro to CONFIG_DRM_EXYNOS_FIMD to fix this. Fixes the following boot time crash: Unable to handle kernel NULL pointer dereference at virtual address 00000000 PC is at 0x0 LR is at s3c_fb_probe+0x198/0x788 [] (s3c_fb_probe+0x198/0x788) from [] (platform_drv_probe+0x18/0x1c) [] (platform_drv_probe+0x18/0x1c) from [] (driver_probe_device+0x70/0x1f0) [] (driver_probe_device+0x70/0x1f0) from [] (__driver_attach+0x8c/0x90) [] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x50/0x7c) [] (bus_for_each_dev+0x50/0x7c) from [] (bus_add_driver+0x170/0x23c) [] (bus_add_driver+0x170/0x23c) from [] (driver_register+0x78/0x144) [] (driver_register+0x78/0x144) from [] (do_one_initcall+0x34/0x174) [] (do_one_initcall+0x34/0x174) from [] (kernel_init+0x100/0x2a0) [] (kernel_init+0x100/0x2a0) from [] (ret_from_fork+0x14/0x3c) Signed-off-by: Sachin Kamat --- arch/arm/mach-exynos/mach-smdk4x12.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index a1555a7..ae6da40 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c @@ -246,7 +246,7 @@ static struct samsung_keypad_platdata smdk4x12_keypad_data __initdata = { .cols = 8, }; -#ifdef CONFIG_DRM_EXYNOS +#ifdef CONFIG_DRM_EXYNOS_FIMD static struct exynos_drm_fimd_pdata drm_fimd_pdata = { .panel = { .timing = { @@ -360,7 +360,7 @@ static void __init smdk4x12_machine_init(void) s3c_hsotg_set_platdata(&smdk4x12_hsotg_pdata); -#ifdef CONFIG_DRM_EXYNOS +#ifdef CONFIG_DRM_EXYNOS_FIMD s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; exynos4_fimd0_gpio_setup_24bpp(); #else