From patchwork Thu Aug 22 05:45:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 19393 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1663B248E6 for ; Thu, 22 Aug 2013 06:02:48 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oz10sf1285367veb.7 for ; Wed, 21 Aug 2013 23:02:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=m+ZYfFVyCh4z6hFaP9vh7to4RFLP+d7TuzYPk3f6ueA=; b=YJnOGiwijnro4/f3rGG4i168rCr5FW6JJQRKOjiJU0OrTNBjXMAiSOb5TcscWtNtbj v5roQ4dQ9gZdGTfDbgQIkL4xCoFemsagFC3tezEde393borqbphO2cLOzuPB/Lo5sOxp AQvLLXV7RB9ZEzP/kjNqncOJbGbyhOAuyd/es1nxhlKfgMX8sZx3AF9QkT4cT4mAi2FQ +lth7T7soEzBZZ0k5fke9Z1Kn6ewib8OikP1ykmEPFjpfpYvL9OiWlO5TpkPP3CgO30j kvJ0g6McHq/Caz9eH6IenJ3wsy+W85N+xe2q9njPaSAsgHDEL+I8Z4aZuk9NwtL3c+tk uK1g== X-Received: by 10.224.173.4 with SMTP id n4mr11995365qaz.3.1377151367567; Wed, 21 Aug 2013 23:02:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.25.46 with SMTP id z14ls959470qef.98.gmail; Wed, 21 Aug 2013 23:02:47 -0700 (PDT) X-Received: by 10.52.180.229 with SMTP id dr5mr8264391vdc.20.1377151367463; Wed, 21 Aug 2013 23:02:47 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id wh9si4275vcb.93.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 23:02:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id db10so1170601veb.0 for ; Wed, 21 Aug 2013 23:02:47 -0700 (PDT) X-Gm-Message-State: ALoCoQnr3sPgpFSQ2bgV2Oi+g/XdOEWsiR50K7pTjRxTATBXl0jkQiPSm1Se79/8OBVVP6WPDuBj X-Received: by 10.52.232.165 with SMTP id tp5mr8258698vdc.11.1377151367353; Wed, 21 Aug 2013 23:02:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp10632vcz; Wed, 21 Aug 2013 23:02:46 -0700 (PDT) X-Received: by 10.66.120.74 with SMTP id la10mr13558155pab.9.1377151366204; Wed, 21 Aug 2013 23:02:46 -0700 (PDT) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx.google.com with ESMTPS id hk5si8746882pac.67.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 23:02:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.181 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.192.181; Received: by mail-pd0-f181.google.com with SMTP id g10so1431993pdj.40 for ; Wed, 21 Aug 2013 23:02:45 -0700 (PDT) X-Received: by 10.67.1.41 with SMTP id bd9mr3627470pad.116.1377151365688; Wed, 21 Aug 2013 23:02:45 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id oj6sm14409805pab.9.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 23:02:44 -0700 (PDT) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Cc: inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/6] drm/exynos: Remove non-DT support in exynos_drm_fimd Date: Thu, 22 Aug 2013 11:15:18 +0530 Message-Id: <1377150323-12546-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Since commit 383ffda2fa ("ARM: EXYNOS: no more support non-DT for EXYNOS SoCs"), Exynos platform is DT only. Hence remove all the conditional macros and make the driver DT only. Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 54 +++++++----------------------- 1 file changed, 13 insertions(+), 41 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index f8889d2..90da9ef 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -123,7 +123,6 @@ struct fimd_context { struct fimd_driver_data *driver_data; }; -#ifdef CONFIG_OF static const struct of_device_id fimd_driver_dt_match[] = { { .compatible = "samsung,s3c6400-fimd", .data = &s3c64xx_fimd_driver_data }, @@ -133,21 +132,14 @@ static const struct of_device_id fimd_driver_dt_match[] = { .data = &exynos5_fimd_driver_data }, {}, }; -#endif static inline struct fimd_driver_data *drm_fimd_get_driver_data( struct platform_device *pdev) { -#ifdef CONFIG_OF const struct of_device_id *of_id = of_match_device(fimd_driver_dt_match, &pdev->dev); - if (of_id) - return (struct fimd_driver_data *)of_id->data; -#endif - - return (struct fimd_driver_data *) - platform_get_device_id(pdev)->driver_data; + return (struct fimd_driver_data *)of_id->data; } static bool fimd_display_is_connected(struct device *dev) @@ -891,23 +883,18 @@ static int fimd_probe(struct platform_device *pdev) int win; int ret = -EINVAL; - if (dev->of_node) { - pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) - return -ENOMEM; + if (!dev->of_node) + return -ENODEV; - ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing, - OF_USE_NATIVE_MODE); - if (ret) { - DRM_ERROR("failed: of_get_fb_videomode() : %d\n", ret); - return ret; - } - } else { - pdata = dev->platform_data; - if (!pdata) { - DRM_ERROR("no platform data specified\n"); - return -EINVAL; - } + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); + if (!pdata) + return -ENOMEM; + + ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing, + OF_USE_NATIVE_MODE); + if (ret) { + DRM_ERROR("failed: of_get_fb_videomode() : %d\n", ret); + return ret; } panel = &pdata->panel; @@ -1069,20 +1056,6 @@ static int fimd_runtime_resume(struct device *dev) } #endif -static struct platform_device_id fimd_driver_ids[] = { - { - .name = "s3c64xx-fb", - .driver_data = (unsigned long)&s3c64xx_fimd_driver_data, - }, { - .name = "exynos4-fb", - .driver_data = (unsigned long)&exynos4_fimd_driver_data, - }, { - .name = "exynos5-fb", - .driver_data = (unsigned long)&exynos5_fimd_driver_data, - }, - {}, -}; - static const struct dev_pm_ops fimd_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(fimd_suspend, fimd_resume) SET_RUNTIME_PM_OPS(fimd_runtime_suspend, fimd_runtime_resume, NULL) @@ -1091,11 +1064,10 @@ static const struct dev_pm_ops fimd_pm_ops = { struct platform_driver fimd_driver = { .probe = fimd_probe, .remove = fimd_remove, - .id_table = fimd_driver_ids, .driver = { .name = "exynos4-fb", .owner = THIS_MODULE, .pm = &fimd_pm_ops, - .of_match_table = of_match_ptr(fimd_driver_dt_match), + .of_match_table = fimd_driver_dt_match, }, };