From patchwork Wed Dec 9 14:00:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 7809001 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8DFEEBEEE1 for ; Wed, 9 Dec 2015 14:00:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFBAE20462 for ; Wed, 9 Dec 2015 14:00:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59A51204A9 for ; Wed, 9 Dec 2015 14:00:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754938AbbLIOAb (ORCPT ); Wed, 9 Dec 2015 09:00:31 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:58303 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754381AbbLIOA3 (ORCPT ); Wed, 9 Dec 2015 09:00:29 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NZ3008KMG8RAG80@mailout4.w1.samsung.com>; Wed, 09 Dec 2015 14:00:27 +0000 (GMT) X-AuditID: cbfec7f5-f79b16d000005389-8f-566833fae899 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 52.AF.21385.AF338665; Wed, 9 Dec 2015 14:00:26 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NZ300N2FG8M3900@eusync1.samsung.com>; Wed, 09 Dec 2015 14:00:26 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Kamil Debski Subject: [PATCH 2/4] media: s5p-g2d: remove non-device-tree init code Date: Wed, 09 Dec 2015 15:00:14 +0100 Message-id: <1449669616-24802-2-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1449669616-24802-1-git-send-email-m.szyprowski@samsung.com> References: <1449669616-24802-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNJMWRmVeSWpSXmKPExsVy+t/xy7q/jDPCDE7s0LL48foCm0XPhq2s FjPO72OyWHvkLrvF4TftrA6sHn1bVjF6fN4kF8AUxWWTkpqTWZZapG+XwJVx7d0UloKJwhXf prWwNTA2CXQxcnJICJhIPDn8lhHCFpO4cG89WxcjF4eQwFJGiVtL5jBDOE1MEhcvn2AHqWIT MJToetvFBmKLCDhJLJz1lx2kiFmglVHixL2nrCAJYQFXiXmzDjGD2CwCqhLHliwHi/MKeEhc fTsfap2cxP+XK5i6GDk4OAU8JdZPdwIJCwGV3Hj4kXUCI+8CRoZVjKKppckFxUnpuUZ6xYm5 xaV56XrJ+bmbGCFB8nUH49JjVocYBTgYlXh4K5zSw4RYE8uKK3MPMUpwMCuJ8J7QzwgT4k1J rKxKLcqPLyrNSS0+xCjNwaIkzjtz1/sQIYH0xJLU7NTUgtQimCwTB6dUA6Ocv0eTZ9b/PT/Y Kg/ckG+NnH0hc+FDq553U6eWzBJ8+m/myR0e+nUMWhlyS33FQtvLboYsEV52qfjnHHutu3KL OALqcyd/KQjPTP/Bnf4k//2izWevs5XbTp89qZqje63+kqsbHeruRh3S+yJ7ojXer33xja01 TvxzH73wVLt+0uDx22us/Q+VWIozEg21mIuKEwH0X6lNDgIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Exynos and Samsung S5PXXXX platforms has been fully converted to device tree, so old platform device based init data can be now removed. Signed-off-by: Marek Szyprowski --- drivers/media/platform/s5p-g2d/g2d.c | 27 +++++---------------------- drivers/media/platform/s5p-g2d/g2d.h | 5 ----- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c index 31f6c23..be411a9 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -720,16 +720,12 @@ static int g2d_probe(struct platform_device *pdev) def_frame.stride = (def_frame.width * def_frame.fmt->depth) >> 3; - if (!pdev->dev.of_node) { - dev->variant = g2d_get_drv_data(pdev); - } else { - of_id = of_match_node(exynos_g2d_match, pdev->dev.of_node); - if (!of_id) { - ret = -ENODEV; - goto unreg_video_dev; - } - dev->variant = (struct g2d_variant *)of_id->data; + of_id = of_match_node(exynos_g2d_match, pdev->dev.of_node); + if (!of_id) { + ret = -ENODEV; + goto unreg_video_dev; } + dev->variant = (struct g2d_variant *)of_id->data; return 0; @@ -789,22 +785,9 @@ static const struct of_device_id exynos_g2d_match[] = { }; MODULE_DEVICE_TABLE(of, exynos_g2d_match); -static const struct platform_device_id g2d_driver_ids[] = { - { - .name = "s5p-g2d", - .driver_data = (unsigned long)&g2d_drvdata_v3x, - }, { - .name = "s5p-g2d-v4x", - .driver_data = (unsigned long)&g2d_drvdata_v4x, - }, - {}, -}; -MODULE_DEVICE_TABLE(platform, g2d_driver_ids); - static struct platform_driver g2d_pdrv = { .probe = g2d_probe, .remove = g2d_remove, - .id_table = g2d_driver_ids, .driver = { .name = G2D_NAME, .of_match_table = exynos_g2d_match, diff --git a/drivers/media/platform/s5p-g2d/g2d.h b/drivers/media/platform/s5p-g2d/g2d.h index b0e52ab..e31df54 100644 --- a/drivers/media/platform/s5p-g2d/g2d.h +++ b/drivers/media/platform/s5p-g2d/g2d.h @@ -89,8 +89,3 @@ void g2d_set_flip(struct g2d_dev *d, u32 r); void g2d_set_v41_stretch(struct g2d_dev *d, struct g2d_frame *src, struct g2d_frame *dst); void g2d_set_cmd(struct g2d_dev *d, u32 c); - -static inline struct g2d_variant *g2d_get_drv_data(struct platform_device *pdev) -{ - return (struct g2d_variant *)platform_get_device_id(pdev)->driver_data; -}