Message ID | 20200526183932.272076155@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=+fRt=7I=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C7A8C433E0 for <stable@archiver.kernel.org>; Tue, 26 May 2020 19:27:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3832420721 for <stable@archiver.kernel.org>; Tue, 26 May 2020 19:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590521236; bh=IHMQAUkPIPkDgQAUnVmzk3Y1fsItN9hKj03Nsr2xGN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=mH7lgUHS0q0UfRowbaTdvZDFVk5dpwKolqGnVqgMBZM9owKcfU+nu3QlSYarRqVwq PUIZzMuh+GXMUTw6+vI1tbKKttzmKuELlclnrx7hXVv+vNkcppsE/6RHFSLssMgMAD SEo8gB9oT4iVGscEOjTeKzBVhMpeKjIw5DVRZiPI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389427AbgEZTEa (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 26 May 2020 15:04:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:60142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391375AbgEZTE2 (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 26 May 2020 15:04:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4C6782086A; Tue, 26 May 2020 19:04:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590519867; bh=IHMQAUkPIPkDgQAUnVmzk3Y1fsItN9hKj03Nsr2xGN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=omvgo8RBZfgzRvHdxoznTJX7dKQM45jwRJR2y/P/aZBX4gZBESi7p2Meup9cutKMm Xa6phYw5u/kgBVMU74wcCH+ZKznBfBCnLAsYfGy1EUUzRQ2MSDao1HzHBTszpc6HHp 8vzveq6XMeUT+2hoeoJKF1n0CGNCCd0jEaB4dpFo= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Cristian Ciocaltea <cristian.ciocaltea@gmail.com>, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, =?utf-8?q?Andreas_F=C3=A4rber?= <afaerber@suse.de>, Vinod Koul <vkoul@kernel.org> Subject: [PATCH 4.19 47/81] dmaengine: owl: Use correct lock in owl_dma_get_pchan() Date: Tue, 26 May 2020 20:53:22 +0200 Message-Id: <20200526183932.272076155@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200526183923.108515292@linuxfoundation.org> References: <20200526183923.108515292@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/dma/owl-dma.c +++ b/drivers/dma/owl-dma.c @@ -172,13 +172,11 @@ struct owl_dma_txd { * @id: physical index to this channel * @base: virtual memory base for the dma channel * @vchan: the virtual channel currently being served by this physical channel - * @lock: a lock to use when altering an instance of this struct */ struct owl_dma_pchan { u32 id; void __iomem *base; struct owl_dma_vchan *vchan; - spinlock_t lock; }; /** @@ -396,14 +394,14 @@ static struct owl_dma_pchan *owl_dma_get for (i = 0; i < od->nr_pchans; i++) { pchan = &od->pchans[i]; - spin_lock_irqsave(&pchan->lock, flags); + spin_lock_irqsave(&od->lock, flags); if (!pchan->vchan) { pchan->vchan = vchan; - spin_unlock_irqrestore(&pchan->lock, flags); + spin_unlock_irqrestore(&od->lock, flags); break; } - spin_unlock_irqrestore(&pchan->lock, flags); + spin_unlock_irqrestore(&od->lock, flags); } return pchan;