From patchwork Tue Sep 25 08:57:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inderpal Singh X-Patchwork-Id: 11708 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 295F823EFB for ; Tue, 25 Sep 2012 08:57:59 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id C7245A19039 for ; Tue, 25 Sep 2012 08:57:58 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so12262301iej.11 for ; Tue, 25 Sep 2012 01:57:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Aj7+wmT8+h415v3+dEaE4vUAiirBejU/C/vIMGTTJUw=; b=CwhBG7CSLMbWExGH0j93mCBhesByGstriFbJmIBav0jf1FP9YDo1N7tQixte+o48qh FdKcR50eSyTigT4K/nbjEQKN7JStj/+4YdopZVXjqK6vBkq0AW37XKqE/g/vpJN1Y91Y vhthTVds4Y2d/Ud7X/JX37A6/SGw5hQaCcRv2jQX6neQyO+h8ztJ32R9AbuZNw39AQWM XXl6mrdLGxwcFQ7O4VBlt4/DVDec4EJqKQEu8ZPXtnBb/3jPWmt3CCVfED53oyO6NWhg ul24JMoBStcMoFMKpqzyjK16g5pQ3EKqrMli3wiptYSgv4Cr3blHqS2W2wUExyRZI40l gfSQ== Received: by 10.50.195.134 with SMTP id ie6mr7623642igc.28.1348563478577; Tue, 25 Sep 2012 01:57:58 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp283046igc; Tue, 25 Sep 2012 01:57:58 -0700 (PDT) Received: by 10.68.134.97 with SMTP id pj1mr43841136pbb.55.1348563478051; Tue, 25 Sep 2012 01:57:58 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id ou2si65151pbb.20.2012.09.25.01.57.57 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 01:57:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of inderpal.singh@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of inderpal.singh@linaro.org) smtp.mail=inderpal.singh@linaro.org Received: by mail-pb0-f50.google.com with SMTP id wz7so110925pbc.37 for ; Tue, 25 Sep 2012 01:57:57 -0700 (PDT) Received: by 10.68.220.104 with SMTP id pv8mr43961314pbc.119.1348563477845; Tue, 25 Sep 2012 01:57:57 -0700 (PDT) Received: from inder-ubuntu.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPS id rr6sm21523pbc.47.2012.09.25.01.57.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 01:57:57 -0700 (PDT) From: Inderpal Singh To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jassisinghbrar@gmail.com, boojin.kim@samsung.com, vinod.koul@intel.com, patches@linaro.org, kgene.kim@samsung.com Subject: [PATCH 3/3] DMA: PL330: Balance module remove function with probe Date: Tue, 25 Sep 2012 14:27:36 +0530 Message-Id: <1348563456-30569-4-git-send-email-inderpal.singh@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1348563456-30569-1-git-send-email-inderpal.singh@linaro.org> References: <1348563456-30569-1-git-send-email-inderpal.singh@linaro.org> X-Gm-Message-State: ALoCoQkJTtjnEBN53pvM5dOwCgaUR+QI3/NB+qDGnyPsZj/dLrfXGHAvmtr62nJE1qzErFWU1MQY Since peripheral channel resources are not being allocated at probe, no need to flush the channels and free the resources in remove function. Signed-off-by: Inderpal Singh --- drivers/dma/pl330.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 04d83e6..6f06080 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -3012,16 +3012,10 @@ static int __devexit pl330_remove(struct amba_device *adev) /* Idle the DMAC */ list_for_each_entry_safe(pch, _p, &pdmac->ddma.channels, - chan.device_node) { - + chan.device_node) /* Remove the channel */ list_del(&pch->chan.device_node); - /* Flush the channel */ - pl330_control(&pch->chan, DMA_TERMINATE_ALL, 0); - pl330_free_chan_resources(&pch->chan); - } - while (!list_empty(&pdmac->desc_pool)) { desc = list_entry(pdmac->desc_pool.next, struct dma_pl330_desc, node);