From patchwork Sun Oct 15 23:22:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10007337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 71D5060230 for ; Sun, 15 Oct 2017 23:22:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61B182582C for ; Sun, 15 Oct 2017 23:22:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56224262AE; Sun, 15 Oct 2017 23:22:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECFF02582C for ; Sun, 15 Oct 2017 23:22:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751490AbdJOXW5 (ORCPT ); Sun, 15 Oct 2017 19:22:57 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:44780 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751235AbdJOXW4 (ORCPT ); Sun, 15 Oct 2017 19:22:56 -0400 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990416AbdJOXWz5MGCK (ORCPT ); Mon, 16 Oct 2017 01:22:55 +0200 Date: Mon, 16 Oct 2017 01:22:54 +0200 From: Ladislav Michl To: linux-omap@vger.kernel.org Cc: Roger Quadros , Tony Lindgren Subject: [PATCH 10/11] memory: omap-gpmc: Do not use omap_onenand_platform_data Message-ID: <20171015232254.f4jikotxhugrr33t@lenoch> References: <20171015231641.zt5fz6fidp5eczf6@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171015231641.zt5fz6fidp5eczf6@lenoch> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP OMAP2+ OneNAND MTD driver is now configured using DT, remove now dead code. Signed-off-by: Ladislav Michl --- drivers/memory/omap-gpmc.c | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index b2fe3be4f914..0229ad589f44 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -32,7 +32,6 @@ #include #include -#include #include @@ -2084,9 +2083,6 @@ static void __maybe_unused gpmc_read_timings_dt(struct device_node *np, of_property_read_bool(np, "gpmc,time-para-granularity"); } -extern int -gpmc_omap_onenand_init(struct omap_onenand_platform_data *_onenand_data); - /** * gpmc_probe_child - configures the gpmc for a child device * @pdev: pointer to gpmc platform device @@ -2098,8 +2094,6 @@ gpmc_omap_onenand_init(struct omap_onenand_platform_data *_onenand_data); static int gpmc_probe_child(struct platform_device *pdev, struct device_node *child) { - struct omap_onenand_platform_data *gpmc_onenand_data; - struct platform_device *child_dev; struct gpmc_settings gpmc_s; struct gpmc_timings gpmc_t; struct resource res; @@ -2241,25 +2235,6 @@ static int gpmc_probe_child(struct platform_device *pdev, gpmc_s.device_nand = true; } else if (of_device_is_compatible(child, "ti,omap2-onenand") || of_device_is_compatible(child, "ti,omap3-onenand")) { - gpmc_onenand_data = devm_kzalloc(&pdev->dev, - sizeof(*gpmc_onenand_data), - GFP_KERNEL); - if (!gpmc_onenand_data) { - ret = -ENOMEM; - goto err; - } - - gpmc_onenand_data->cs = cs; - gpmc_onenand_data->of_node = child; - if (!of_property_read_u32(child, "dma-channel", &val)) - gpmc_onenand_data->dma_channel = val; - else - gpmc_onenand_data->dma_channel = -1; - - ret = gpmc_omap_onenand_init(gpmc_onenand_data); - if (ret) - goto err; - gpmc_omap_onenand_calc_async_timings(&gpmc_t, &gpmc_s); } else { ret = of_property_read_u32(child, "bank-width", @@ -2308,19 +2283,9 @@ static int gpmc_probe_child(struct platform_device *pdev, no_timings: /* create platform device, NULL on error or when disabled */ - child_dev = of_platform_device_create(child, NULL, &pdev->dev); - if (!child_dev) + if (!of_platform_device_create(child, NULL, &pdev->dev)) goto err_child_fail; - /* Use platform data until OneNAND driver is DT aware */ - if (gpmc_onenand_data) { - child_dev->name = "omap2-onenand"; - child_dev->dev.platform_data = gpmc_onenand_data; - ret = platform_device_add_resources(child_dev, &res, 1); - if (ret) - goto err_child_fail; - } - /* is child a common bus? */ if (of_match_node(of_default_bus_match_table, child)) /* create children and other common bus children */