From patchwork Fri Jun 10 22:11:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 9170595 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 0821D6048F for ; Fri, 10 Jun 2016 22:12:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEB1728210 for ; Fri, 10 Jun 2016 22:12:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E352B2833F; Fri, 10 Jun 2016 22:12:57 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 705AD28210 for ; Fri, 10 Jun 2016 22:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933141AbcFJWMb (ORCPT ); Fri, 10 Jun 2016 18:12:31 -0400 Received: from mail-lf0-f50.google.com ([209.85.215.50]:36098 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbcFJWM1 (ORCPT ); Fri, 10 Jun 2016 18:12:27 -0400 Received: by mail-lf0-f50.google.com with SMTP id q132so16181326lfe.3 for ; Fri, 10 Jun 2016 15:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=CzxdwaOSy6QxxstsJgSQ+/1sPWNEnyC3X9bj2YG/WJs=; b=kCXJGfmhr1KNrngZPVyxus/YxREP0t3+S5iwIypon+65/QQotHxrJeuzppagk5lk2x lUvtyGi/GxQpfsJB5qh9+kaBrCqaSxSsJB9OO6fKScKFvdd2luLRl+bk7WRYD0goqryZ pzEOxyx/ubdtajTrGpc2Vq4mUwnKdMEhl2lB8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CzxdwaOSy6QxxstsJgSQ+/1sPWNEnyC3X9bj2YG/WJs=; b=dlu6g4ul1zH/Jblnu2pxcxnkhWiZmiKRVv2badJVA8Mzp9uk8KJxnOlimN26bwc/lB /nUYqJNNxnPRxO3fWaXLHTDKiG/SDZZsrIIlA+7X0HGpesbeVbK0hTNKROgv0Yj5/muI g/esPncf8Ws9oCbNnWnelaM19SEX2sn+q2vaq8PtQWMIfJfB/vI8R9cc9rafx0Oe6BRx f6xVNG4Cb2SUDlOD2fsto0NPXKzU/FfIBv29SL0RNoHr9tgMxv6wpkrmDsH9tkIkWGBv Zyf2SwF0/4mStejNLR1DmrrZV7SSLTGzsaoJqm0JM7gK4YpaOZ3WaHB4oxTzLg+bXmK5 nZmw== X-Gm-Message-State: ALyK8tK8LzBjk41HwDLYMWH3ctKkWuu8kWU+TgsPo4TvfBKT8D7nrlLgxpGDVv3HHp4OfH+Z X-Received: by 10.46.1.166 with SMTP id f38mr1170674lji.25.1465596745576; Fri, 10 Jun 2016 15:12:25 -0700 (PDT) Received: from localhost.localdomain ([212.90.63.58]) by smtp.gmail.com with ESMTPSA id f72sm1383740lji.36.2016.06.10.15.12.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Jun 2016 15:12:24 -0700 (PDT) From: Ivan Khoronzhuk To: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, mugunthanvnm@ti.com Cc: grygorii.strashko@ti.com, netdev@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH] net: ethernet: ti: cpsw: use destroy ctlr to destroy channels Date: Sat, 11 Jun 2016 01:11:54 +0300 Message-Id: <1465596714-26697-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 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 There is no reason to destroy channels that are destroyed while cpdma_ctlr destroy. In this case no need to remember how much channels where created and destroy them by one, as cpdma_ctlr destroys all of them. Signed-off-by: Ivan Khoronzhuk --- Based on master drivers/net/ethernet/ti/cpsw.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index e6bb0ec..5319089 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2505,8 +2505,6 @@ static int cpsw_probe(struct platform_device *pdev) clean_ale_ret: cpsw_ale_destroy(priv->ale); clean_dma_ret: - cpdma_chan_destroy(priv->txch); - cpdma_chan_destroy(priv->rxch); cpdma_ctlr_destroy(priv->dma); clean_runtime_disable_ret: pm_runtime_disable(&pdev->dev); @@ -2534,8 +2532,6 @@ static int cpsw_remove(struct platform_device *pdev) unregister_netdev(ndev); cpsw_ale_destroy(priv->ale); - cpdma_chan_destroy(priv->txch); - cpdma_chan_destroy(priv->rxch); cpdma_ctlr_destroy(priv->dma); pm_runtime_disable(&pdev->dev); device_for_each_child(&pdev->dev, NULL, cpsw_remove_child_device);