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: 69821 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp504408qgf; Fri, 10 Jun 2016 15:12:37 -0700 (PDT) X-Received: by 10.98.18.9 with SMTP id a9mr4632524pfj.14.1465596757552; Fri, 10 Jun 2016 15:12:37 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si689776pat.143.2016.06.10.15.12.36; Fri, 10 Jun 2016 15:12:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933164AbcFJWMc (ORCPT + 30 others); Fri, 10 Jun 2016 18:12:32 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:33393 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752608AbcFJWM1 (ORCPT ); Fri, 10 Jun 2016 18:12:27 -0400 Received: by mail-lf0-f53.google.com with SMTP id f6so32974998lfg.0 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=H7vSi0PJQnehN9FwhZNPXgr7CPFkWcRG6BiUOcfdczPbhaTzY3LcoLAi7weeBxS1+V DA7/SLrYlCC6vxs/lITdJe19HKm+Gubh6bBOrGsQ3oMcD5KzaVFoYAnW6u8jt8y+lUOm RYdAeW+uAywDcP4YzfyXmmnl2ILlVhJMz3w/swB5zcN7ZqWewvULpEL7swVY0cNFa3Dt DtweFfysqCtqEvwgSRGGjgDwCQvVQ39W7iymwkHw1X3RYoW2N+UqDYGK5yY9SeNOYDBF 5pNFiC1Mnn8ZmemE9l9QfH4fI6qUMOtAeMuSV+0bTtvr5YA1hJ2XPbDdldLDbPyFZu7i tsrw== X-Gm-Message-State: ALyK8tI3q9/SPR9YsrcdZjkrHqsBwJzQaICkOKWRATBSzlDjsq2aiIBD4HHlUSt/SSNCgG6k 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) -- 1.9.1 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);