From patchwork Fri Nov 3 20:08:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 117960 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp139647qgn; Fri, 3 Nov 2017 13:09:13 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RH5Pb588ofoHXrugYFMkNCemnzhoAHFDCoaCCAqqxX656XPgetVDawZOPsEH9C3YLVf1fu X-Received: by 10.98.32.212 with SMTP id m81mr8729191pfj.227.1509739753786; Fri, 03 Nov 2017 13:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509739753; cv=none; d=google.com; s=arc-20160816; b=t+18aq6qn6/sO2K3kwYI4QqAWdRdv1Q5Jf2GYXiiQLxhQj7Xi7auVhttA5ySpjEcWi 1JCsHO+g1hBUxCMLNSJjVP3RAmPHBlOj3IXDRIlRiVAU75ZUuF85ocFYjbqlc7KxXjlT zosxL2DM02ptuQLLf9TnVeQOx0bqsbqKyWn8RK545g3W5Lvw1Fruk+9HzMJnrH9t7dlR 5ftMDxtfqYIZH9Qj0LG1zwwZR+kEXAt8dcCS0uqyxWeiNfeAQQhoT6r2pxXr4/WYVfNw tNSBxZrbOWYc/PxrVh3rCP5HTAdz80Fz4P0vVrApIDXWnkhV/FNdTNR1x7yKnJ6L7Hzz vz7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=3MGkpSkyBbHydmoHjUqyaH/E+Wvj5DM2raWST4kSIjM=; b=awornTXQYGRmRdTlB6bkbG14q2gOPuw/UQ8J/+ZfWWUz/fgrVyJRHrtPR6cMTRUfQt ZAbyAX9ESRPPV8MY3SxJ5/XX7Vah2iWFlWuGPxQg+BDqKwUzE15eIXaXDM0kR4ydZQ73 GWU4Ygmh+P7jegMwyRX39tyoLz35/tlp5W3CAaBY+EmR1NvjRIGXIUek1X/dvnQ111W5 JsR70lTQdmW7sgPN6TtW7p4wkheVf3bT9aD39v5+ZKVKBMJbi6okdwcgCGnu4rlwW0jZ zKdVpp8wpf0D03SSIwWWnfMhHYKRFlh7hCHf13p9U4gTTWRXbcqmf/2+hmKd8pmSLlm3 JXHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=OW0XbWV0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34si5407145plm.300.2017.11.03.13.09.13; Fri, 03 Nov 2017 13:09:13 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=OW0XbWV0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933510AbdKCUI6 (ORCPT + 26 others); Fri, 3 Nov 2017 16:08:58 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:50370 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756495AbdKCUIy (ORCPT ); Fri, 3 Nov 2017 16:08:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3MGkpSkyBbHydmoHjUqyaH/E+Wvj5DM2raWST4kSIjM=; b=OW0XbWV0i+r/OophyrM1cXWqt G7T10xhKTLF6YDMjmv4o2ExdfZr/n2vy6vwe8gutIXuD6pKn0FgrgMdHCR1Oosa+DsNQV2ZoQKQiI cReMb9/+HqQ9jyMTDBQ9yk4wcEEa5e9MyuZCBbQ6lbG62qb106s+mUKaeKo799X4qzXvQ=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eAiGr-0000aB-Nc; Fri, 03 Nov 2017 20:08:53 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1eAiGq-0002fZ-5v; Fri, 03 Nov 2017 20:08:52 +0000 From: Mark Brown To: Baolin Wang Cc: linux-kernel@vger.kernel.org, Mark Brown Subject: [PATCH 2/2] regmap: Clean up hwspinlock on regmap exit Date: Fri, 3 Nov 2017 20:08:51 +0000 Message-Id: <20171103200851.10215-2-broonie@kernel.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171103200851.10215-1-broonie@kernel.org> References: <20171103200851.10215-1-broonie@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should free any hwspinlocks when we destroy the regmap, do so. Signed-off-by: Mark Brown --- drivers/base/regmap/regmap.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.15.0 diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 5ff549fa880b..bfe2f250d011 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -1305,6 +1305,8 @@ void regmap_exit(struct regmap *map) kfree(async->work_buf); kfree(async); } + if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock) + hwspin_lock_free(map->hwlock); kfree(map); } EXPORT_SYMBOL_GPL(regmap_exit);