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: 633975 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rRGdD2mD0z9ry7 for ; Sat, 11 Jun 2016 08:12:48 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=kCXJGfmh; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933146AbcFJWMb (ORCPT ); Fri, 10 Jun 2016 18:12:31 -0400 Received: from mail-lf0-f44.google.com ([209.85.215.44]:36098 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752485AbcFJWM1 (ORCPT ); Fri, 10 Jun 2016 18:12:27 -0400 Received: by mail-lf0-f44.google.com with SMTP id q132so16181300lfe.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=HWMwR1JRwbPEWLAesK3IhczVUo/Llq9sz/fl0pCEPJUJM6imGycZcaRXW5ZqX4yPYv UxhfavOZQ1tbx47PSaK15f6RoSRdFSRgb1ERzdCXoNTBKuixfi5ilJ2IxVws2M7w6Kxo uVsO48RK+jcTNy5At95O915yWPs9f+tAiBg2viuvcHeopA+KnclQ5323uaax2OcIsZd6 x70oB44TCp6q4yg/24MABtv3Rs/NNPLwC70YBVLAUKvl7ldCS4/OJDAuq/8sgEFHNyGy OAD1fOQA4W1481G4SnWd7Na3YBHgCXxJ6v0X1uubIh/nUvYCVjJrIbDaIEh373eUDlPf zEiw== X-Gm-Message-State: ALyK8tL468S9EYSWQvwqz8qm4XBN+27EZZ5jv+12KpQ09ctDs5EbHY6VJO853qDkJWIaMVJP 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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);