From patchwork Wed Dec 9 14:00:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 7809051 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 83471BEEE1 for ; Wed, 9 Dec 2015 14:00:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A39B020457 for ; Wed, 9 Dec 2015 14:00:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BADC6204A9 for ; Wed, 9 Dec 2015 14:00:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754883AbbLIOAf (ORCPT ); Wed, 9 Dec 2015 09:00:35 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:63277 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754449AbbLIOA3 (ORCPT ); Wed, 9 Dec 2015 09:00:29 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NZ300LQ9G8R7280@mailout1.w1.samsung.com>; Wed, 09 Dec 2015 14:00:27 +0000 (GMT) X-AuditID: cbfec7f5-f79b16d000005389-92-566833fbadb5 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 23.AF.21385.BF338665; Wed, 9 Dec 2015 14:00:27 +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:27 +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 3/4] media: s5p-mfc: remove non-device-tree init code Date: Wed, 09 Dec 2015 15:00:15 +0100 Message-id: <1449669616-24802-3-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/jTPCDCavYrb48foCm0XPhq2s FjPO72OyWHvkLrvF4TftrA6sHn1bVjF6fN4kF8AUxWWTkpqTWZZapG+XwJWxa91TxoLrghWn Lh5hamA8zdfFyMkhIWAisXPGKWYIW0ziwr31bF2MXBxCAksZJU4s/8ME4TQxSZxov8EEUsUm YCjR9baLDcQWEXCSWDjrLztIEbNAK1DHvaesIAlhAVeJzp4LLCA2i4CqxKQd+8EaeAU8JO70 P2CEWCcn8f/lCqChHBycAp4S66c7gYSFgEpuPPzIOoGRdwEjwypG0dTS5ILipPRcI73ixNzi 0rx0veT83E2MkCD5uoNx6TGrQ4wCHIxKPLwVTulhQqyJZcWVuYcYJTiYlUR4T+hnhAnxpiRW VqUW5ccXleakFh9ilOZgURLnnbnrfYiQQHpiSWp2ampBahFMlomDU6qBMYE1UdoqK4Vp4mwb lbUNuzuvaGdmK1RlzX5uny5+UnD5h/5pv5QrAn7KzjCbEHaUYRIX67F176M3OoRWXVLeUKq9 6rJxaeft/7OzsqcVP2JKW6r78bV91KGjspvd7YueGKix6ZanfeZKzpsUqtCwLPDMnU+bzuwy aq045jh3s5rIJQWXbpEYJZbijERDLeai4kQAXCsRVA4CAAA= 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-mfc/s5p_mfc.c | 37 +++++--------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index bae7c0f..5d0a75e 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1489,27 +1489,6 @@ static struct s5p_mfc_variant mfc_drvdata_v8 = { .fw_name[0] = "s5p-mfc-v8.fw", }; -static const struct platform_device_id mfc_driver_ids[] = { - { - .name = "s5p-mfc", - .driver_data = (unsigned long)&mfc_drvdata_v5, - }, { - .name = "s5p-mfc-v5", - .driver_data = (unsigned long)&mfc_drvdata_v5, - }, { - .name = "s5p-mfc-v6", - .driver_data = (unsigned long)&mfc_drvdata_v6, - }, { - .name = "s5p-mfc-v7", - .driver_data = (unsigned long)&mfc_drvdata_v7, - }, { - .name = "s5p-mfc-v8", - .driver_data = (unsigned long)&mfc_drvdata_v8, - }, - {}, -}; -MODULE_DEVICE_TABLE(platform, mfc_driver_ids); - static const struct of_device_id exynos_mfc_match[] = { { .compatible = "samsung,mfc-v5", @@ -1531,24 +1510,18 @@ MODULE_DEVICE_TABLE(of, exynos_mfc_match); static void *mfc_get_drv_data(struct platform_device *pdev) { struct s5p_mfc_variant *driver_data = NULL; + const struct of_device_id *match; + + match = of_match_node(exynos_mfc_match, pdev->dev.of_node); + if (match) + driver_data = (struct s5p_mfc_variant *)match->data; - if (pdev->dev.of_node) { - const struct of_device_id *match; - match = of_match_node(exynos_mfc_match, - pdev->dev.of_node); - if (match) - driver_data = (struct s5p_mfc_variant *)match->data; - } else { - driver_data = (struct s5p_mfc_variant *) - platform_get_device_id(pdev)->driver_data; - } return driver_data; } static struct platform_driver s5p_mfc_driver = { .probe = s5p_mfc_probe, .remove = s5p_mfc_remove, - .id_table = mfc_driver_ids, .driver = { .name = S5P_MFC_NAME, .pm = &s5p_mfc_pm_ops,