From patchwork Fri Sep 27 07:10:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 174591 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3112940ill; Fri, 27 Sep 2019 00:11:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzF3uzTTcSjKd2VlgqDsbTSaOvTP09MrRcTJCTYuvAZUZ1KB7gL3sIMFoa7G+zD1bQ4+AbG X-Received: by 2002:a17:906:6c98:: with SMTP id s24mr6370108ejr.28.1569568288572; Fri, 27 Sep 2019 00:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569568288; cv=none; d=google.com; s=arc-20160816; b=lRX9gwAJWcupkGUMu6uL16TxBUGhpxkHMoWPp6yjsHT9R6B8tA+ZiR054q7q8ulRYB wRmND8Q0Tn43jKhno9tm3ZWNblqml7BpciX/g5riGWMaqxCD0w3cfYz2ZHZAN6eomQFs FJEpXuck+V8oAt3VtF+I0E3xDEI9MRM5JgYcY9AnyjXATtlDXxmt3aeAHLTJR0Wp9O7V ngTfaXArTyMP4VUIHnP8ZImBCKLOvoE/mh2awVcaB/YdaPYhdEUlkyvi2gP3NWF9eLlR WuMa9sI+lOwO7JBKEj29Yoem7QoztSOuRycKUXRudC3FqbY7Ez5lykXXs40MZyU0KRts ANzA== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=JWJl6+k678lNhoIwgPT24JSdOgdcYLv3dPpKZNuhawQ=; b=Eq8i7ic77A8y80pJDNVSCLz/96JT7lORPh/QdItzo60/icYNnoDLeGH2nXkWQPwAdW nhLHc9/EEl8kcYGgduqpUtBSO3vubzkX9uplUcvv51xxFDvcszXLeZTPdoLftF5fpTyQ /wS1V55CwggPmBYklj5CdK4hICkawZXTFW8JAQw01MxP2WG65C9ZyEjwY3NaYNFQNE0q fTqUJR/lkBCwp9cZbmUbVwfqek7U7OU6uCzefP2H5tUpEQjHqbhd1oJ/QwrHH6+oIsph ry4xNTXaBe2VpsyaOxWq0nPlYV0xco9RKwYA+qEX78+RR24+DMZ+4cjNb8f/i2JTOH8F wDZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e8jqNvEb; 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 sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t26si945311edd.184.2019.09.27.00.11.28; Fri, 27 Sep 2019 00:11:28 -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 header.s=google header.b=e8jqNvEb; 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 sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726584AbfI0HL0 (ORCPT + 26 others); Fri, 27 Sep 2019 03:11:26 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:41294 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726498AbfI0HLY (ORCPT ); Fri, 27 Sep 2019 03:11:24 -0400 Received: by mail-pl1-f193.google.com with SMTP id t10so702142plr.8 for ; Fri, 27 Sep 2019 00:11:24 -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:in-reply-to:references :in-reply-to:references; bh=JWJl6+k678lNhoIwgPT24JSdOgdcYLv3dPpKZNuhawQ=; b=e8jqNvEbhvr0kgtsFK625isW2I3jDhZSNomDeSga2oSYqTtT6RV+dW3pDm6Z3HXJ+9 VwZc7ZzddAyp7VGQZ+t1szym8TCRuLxnvAT0WHpHyEZCyeekVFH/IFh3d9QbSVCzMEGW LTiZ1DuLVoVKGGC7tfWmtZc3H06WK4Fq36Dnt0ef98J49H8bvgehZ3rjL8hJuVE6F6Nh zA7Kj0j0nGE7B4kkI0By8EjHSSIp5pz9GqxNXTd2OKQbEQNO0XjYZ2Abcu2K2Ma1Mjf5 fPo05WdTHPdOW4PC3PX+pawyJZq6F9nXCfhckU7KfbjS+u5Dg3A1+e//XI4nKGUYJn8L ZbAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=JWJl6+k678lNhoIwgPT24JSdOgdcYLv3dPpKZNuhawQ=; b=XH7PSA6k5ooPenyFRTVpy5aDMKkEp7jTSK02AJAILiUcCrQkh4yf3XILoJ4hE75zh8 5UlDV05bIQpWyh/C8wqdGiiZg50cYVdcchxYI0zveDXMH/XiE8MYqmqMF4E/tp4R9pHi Bx1EhrpWjx3l/hnxIxQiUr1ONZ9HB7uAYR+gZNPLx+At3u0/EKwndKKiKzno2FvlQRVK M+XQfmmhMEPV+mefdhT61xiUMisgIMxIM/GfQpiQ3/IovECjUY+jpktkCct4Q9n5WCKv zZTMjfzV3DMvqRy3NGU2qcJmvmAweFeySzlwgdpg9rYFEdR/TRBzaeFpfRIsWc4eSUAH Jynw== X-Gm-Message-State: APjAAAVGPkoagDxXtwv8SJrWI7Whv7QyDf/G+9oIGuTz9aRJ7l8dk48g lCYirPiVMccqHZpuLO1QwoiPGQ== X-Received: by 2002:a17:902:9346:: with SMTP id g6mr3045391plp.0.1569568284057; Fri, 27 Sep 2019 00:11:24 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id f74sm1733288pfa.34.2019.09.27.00.11.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Sep 2019 00:11:23 -0700 (PDT) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org Cc: orsonzhai@gmail.com, baolin.wang@linaro.org, zhang.lyra@gmail.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] hwspinlock: sprd: Use devm_hwspin_lock_register() to register hwlock controller Date: Fri, 27 Sep 2019 15:10:47 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_hwspin_lock_register() to register the hwlock controller instead of unregistering the hwlock controller explicitly when removing the device. Signed-off-by: Baolin Wang --- drivers/hwspinlock/sprd_hwspinlock.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 1.7.9.5 diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c index e76c702..44d69db 100644 --- a/drivers/hwspinlock/sprd_hwspinlock.c +++ b/drivers/hwspinlock/sprd_hwspinlock.c @@ -135,8 +135,9 @@ static int sprd_hwspinlock_probe(struct platform_device *pdev) platform_set_drvdata(pdev, sprd_hwlock); pm_runtime_enable(&pdev->dev); - ret = hwspin_lock_register(&sprd_hwlock->bank, &pdev->dev, - &sprd_hwspinlock_ops, 0, SPRD_HWLOCKS_NUM); + ret = devm_hwspin_lock_register(&pdev->dev, &sprd_hwlock->bank, + &sprd_hwspinlock_ops, 0, + SPRD_HWLOCKS_NUM); if (ret) { pm_runtime_disable(&pdev->dev); return ret; @@ -147,9 +148,6 @@ static int sprd_hwspinlock_probe(struct platform_device *pdev) static int sprd_hwspinlock_remove(struct platform_device *pdev) { - struct sprd_hwspinlock_dev *sprd_hwlock = platform_get_drvdata(pdev); - - hwspin_lock_unregister(&sprd_hwlock->bank); pm_runtime_disable(&pdev->dev); return 0; }