From patchwork Sun Nov 11 13:45:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10677625 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B8C4E139B for ; Sun, 11 Nov 2018 13:46:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8FF82A7FC for ; Sun, 11 Nov 2018 13:46:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99A582A809; Sun, 11 Nov 2018 13:46:28 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 3837A2A7FC for ; Sun, 11 Nov 2018 13:46:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728120AbeKKXfE (ORCPT ); Sun, 11 Nov 2018 18:35:04 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:46195 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727594AbeKKXfE (ORCPT ); Sun, 11 Nov 2018 18:35:04 -0500 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MqINP-1fj9On496x-00nT1i; Sun, 11 Nov 2018 14:46:07 +0100 From: Stefan Wahren To: Eric Anholt , Florian Fainelli , Ulf Hansson Cc: Phil Elwell , Michal Suchanek , linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH 3/7] mmc: bcm2835: Release DMA channel on driver unload Date: Sun, 11 Nov 2018 14:45:26 +0100 Message-Id: <1541943930-23873-4-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541943930-23873-1-git-send-email-stefan.wahren@i2se.com> References: <1541943930-23873-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:F2LiMthsBSJ3s1DS3kJl7n5PIcWL+Ao+GBaQlR8S0uGJOiiO8Pw cJJANMzHi+H6Jk02RI/4+pRGp13kuxo/zu5Gca6kyhNwDO5dgJ+CfndbvzgFfJhIPk1bov8 2+eMpF/J2afvG2GNlrtdxVnBE6ScIYWZ4WLvsuIf/LRAnSnEx059ImmryYhNNqPbDE9pxwk Cg+WVcneQkMTHusnA4ThA== X-UI-Out-Filterresults: notjunk:1;V01:K0:BMnnZiRNwFM=:VK18LVcikWkwCb6PWU6dtZ jhso2h+IWk1AyfzelKucsqojg0Hig2iuBvh4dloZcPfLYSIgzzf3pGigEm7bTcVrn4c66Wb3a b6cmsRMakTF9KYxai93XGH5lOF7whiOquDuxUbsC78aRFJieEMYFo05jIay86AhtoE/XzwJr9 2TeUvl1qZcyQY60A1nb5Fx+CKBZVOiPbpVAGk+2t5+k7/zcmoWKWRNgsHTOiidINlWPiGettk jCnHsWb6xCeB/Vp52Kkg8B6p30sx1XgeHM9onnsMGcVqrFCoSB1/BYfriHniJ7suqCq942P/z fWCN36Nr/iFyPSO2gKJoR7XILC2yzWPqTcDx19HOKHGt8Mocmmp2GUgUC4rVWvvRlZ1e5J3Ju 0EpqkddWy2BKe5u39POlQqy1LK1xIeYVW4dlQcWfTjYsawhT/TcEbS9yst3iSd+Hrv6IzUbGL CrG4AQjYj7cLA76aRd4JlJaW/adj23QRi+EdAvhEFWiq1F+s/N4X/uXwXWO2H1SVqLGnAVmUC dknJ+0dXm9kF0puj4emLpF9QT7Ec/c87k+Y0iXDjexcjBdIJuJ3kbGGi+dmmH+qGQQ3XhW7/c H66jlf8FoxuIcaKl/kHYWrpdyq24T+4hy0/xr5OgIkf8BHTBvdNU57pDL/IIbZ5OCT0QFo8x8 PvybVElOdNwk4Rkhcmu5IFT6SyyqaPuTYyhQ4txqAoLIFBul3I4YNdyxwb7E8CQr9JbyKJgpv XNX6wsoh8yTzVNCuhgf71IkYXDHkdnNZyTblwqf+GtDkJ89t6khKXUowoZ7vqldz7JMeuMOIt V8423aPXL8FoPidUum64l0MnEmgNg== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We need to release the slave DMA channel during driver unload. Signed-off-by: Stefan Wahren --- drivers/mmc/host/bcm2835.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index a251be2..45724ef 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1457,6 +1457,9 @@ static int bcm2835_remove(struct platform_device *pdev) cancel_work_sync(&host->dma_work); cancel_delayed_work_sync(&host->timeout_work); + if (host->dma_chan_rxtx) + dma_release_channel(host->dma_chan_rxtx); + mmc_free_host(host->mmc); platform_set_drvdata(pdev, NULL);