From patchwork Wed Dec 4 09:53:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 11272655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03EF314B7 for ; Wed, 4 Dec 2019 09:54:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CDC9B206DB for ; Wed, 4 Dec 2019 09:54:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FEpvgP6A"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZgK2xpmm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDC9B206DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=XiIXk6DCmopDCfxrLCRO2OiOQ9KceOKTTDkEXsckenA=; b=FEpvgP6AcFWIkPkvC20et88OEu 0wfM5qGRlAoTsHkuD4HlinnqseUdSlKSmb+KLEEmzeYHfEsRCfzPXB9GDOZ7nSZxvibXSs+1KngUi EUI5rqyQSj5o9gEgSJZLGxZ72xkFDCkfiR6du+AbSgSkATiyl5MKIJgGZv1uyoUSRfduJpp4wFyvQ va/KkCeOIJMWIjAta5UOweYC+VDoXe1jMat5EUGUi4GQjcLUAbS9vwGX+dZL6w2oALnvYMlSXDBXL pQ5HLqduz/xN1kdCdbvQxMjnSKjXPZnD8a4zMkfLLEocq+DR5stS0CXJbQidcWjc/x2jZ2WifVCon fJ0H6EIA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1icRMc-00047R-PM; Wed, 04 Dec 2019 09:54:30 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1icRMR-0003vQ-OY for linux-arm-kernel@lists.infradead.org; Wed, 04 Dec 2019 09:54:21 +0000 Received: by mail-pj1-x1041.google.com with SMTP id o11so2779337pjp.9 for ; Wed, 04 Dec 2019 01:54:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Yr7ow8GTmJkAHzIYaMaQkuIE5TitlU69AapCYxHxDps=; b=ZgK2xpmmM4E1oWxKp3+/qAKtBGSlbVVCWrUvmWrSxqA8uCqUkHarbkgrW5pREnEz7q rt6GcAQ1G93LP6ZCk+9sS0X5Re1mS5EYwZz1fmK638M6EBGMCv9cnDxTc0SKJJ+RU6mU ponjciEPdNGyVa5aeUb2RANsByGMFmPefMO4nY2m3g2P3Tw2MuPTVJmK7Qd1gaAr8eij UGPdVhbqPGizjDkxglfo66j3Pcwsk2z9WdRG3wanX+H7HOHJghV+bceEKNdKklhSh4pV /g1Tzi1WaH29Nzu1nR0XHmxmNPkLV50GAbW4SIq5WbLALNOaWH+30UkbppuSZ46JSzV7 rbfg== 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=Yr7ow8GTmJkAHzIYaMaQkuIE5TitlU69AapCYxHxDps=; b=h2HN2abVAKKv1jnZywMEUxDKg5dw5KgnDBFyK2k+T6pZSYdWxAxhKejcsEaGgvqLBf M0Z7adcB6j3+Mo31um1jTG+ddvX2vTks627t9UmfuLlvXBdPk8FcAhSU85q2JYyAxSKY oVWqSDo9q0+o6j/2LiNS/7vPjJydZQUN8r444ychWAHwtFt9evp/0Hmrx6wi5s07UBYy 6s9CJodcmE2W8kLccPBYQcygEYT4qtlxu5JdbXaxrKW1yWWONVaJmxNK1WzBK/DFnb/Z aBA7eoZ15FWwYrz4bpHZgbi3qAsR+bU7O7BIemiTP0LBfyhY4WnhM5Pd1+S4HMw8Ff2S UfZg== X-Gm-Message-State: APjAAAUTC2DDeKbJTNQNEhTU8qSvu/nrt6ob6fMhtmP2TzT72vehPMJh Wp7zo10wpbE0Gl1RIljGqBY= X-Google-Smtp-Source: APXvYqy3g3wzo53GR/iSw5diEUdMACLnabPEltuTjdGhFohSu+l6XqI9adpeV2ZgFypPKZYZ2aofYg== X-Received: by 2002:a17:90a:8a8d:: with SMTP id x13mr2323336pjn.97.1575453259348; Wed, 04 Dec 2019 01:54:19 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id k101sm5941687pjb.5.2019.12.04.01.54.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Dec 2019 01:54:18 -0800 (PST) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org, baohua@kernel.org Subject: [PATCH 1/3] hwspinlock: sirf: Change to use devm_platform_ioremap_resource() Date: Wed, 4 Dec 2019 17:53:31 +0800 Message-Id: <812aba62d4f0c1b460a7fb89b165664dde2795a6.1575452516.git.baolin.wang7@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191204_015419_797982_07043558 X-CRM114-Status: GOOD ( 11.67 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (baolin.wang7[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (baolin.wang7[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: baolin.wang7@gmail.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Signed-off-by: Baolin Wang --- drivers/hwspinlock/sirf_hwspinlock.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/hwspinlock/sirf_hwspinlock.c b/drivers/hwspinlock/sirf_hwspinlock.c index 1f625cd..8cb5fd4 100644 --- a/drivers/hwspinlock/sirf_hwspinlock.c +++ b/drivers/hwspinlock/sirf_hwspinlock.c @@ -69,9 +69,9 @@ static int sirf_hwspinlock_probe(struct platform_device *pdev) return -ENOMEM; /* retrieve io base */ - hwspin->io_base = of_iomap(pdev->dev.of_node, 0); - if (!hwspin->io_base) - return -ENOMEM; + hwspin->io_base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(hwspin->io_base)) + return PTR_ERR(hwspin->io_base); for (idx = 0; idx < HW_SPINLOCK_NUMBER; idx++) { hwlock = &hwspin->bank.lock[idx]; @@ -92,7 +92,6 @@ static int sirf_hwspinlock_probe(struct platform_device *pdev) reg_failed: pm_runtime_disable(&pdev->dev); - iounmap(hwspin->io_base); return ret; } @@ -110,8 +109,6 @@ static int sirf_hwspinlock_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); - iounmap(hwspin->io_base); - return 0; } From patchwork Wed Dec 4 09:53:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 11272657 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 65D181593 for ; Wed, 4 Dec 2019 09:54:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3B6F020866 for ; Wed, 4 Dec 2019 09:54:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dhi2R5it"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gEVEszU2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B6F020866 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=MMxyLjxGApyF7ZUk4tDcrSYRSx1BGKciJTDnFO3g8R4=; b=dhi2R5itv8bcDRDudc29HVLpt2 rdNx5xivperoh3peFWmTH+0wYalcsvDU2TnC+6EVVwb35+PnO/pSpvr2AyhekNfgRmBTG7N+NlW3Q NdJE3G3ikBiGlC8KVZYqRBLRkaWR81KDuW4U0omhEwAMlHHPpAlZv5oPPRxklUXE15+snlTdAUQsC 2BXZer10qlxrUFq1jIidPLFoVd344X+3lKdl9L0a6UwtPalPFeostcyoSEra/J8pd3vDpaQPgsB/k Eh0YBYWpk5QXioCMAE28gjmQRP8LQCvsoq63matrndz3l+IyMpy2T+F5rQ4UI1yWRpkUHvjpUJJoW yej/+4VA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1icRMp-0004Km-S3; Wed, 04 Dec 2019 09:54:43 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1icRMU-0003yH-NE for linux-arm-kernel@lists.infradead.org; Wed, 04 Dec 2019 09:54:24 +0000 Received: by mail-pg1-x541.google.com with SMTP id t3so3130324pgl.5 for ; Wed, 04 Dec 2019 01:54:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=aTQ2WmgfLL0RKpED5qehF/7+sveySkG+bgQJgoV8etc=; b=gEVEszU2rEO5LtTSee+SJLa3xwahRpVX4g6r+WflHC3GAFzlRrmEM9Q1ZDYtBB00Fp YFoDyVLMsRLp1zs30FyWG+R7Spwx9P8aLkS22Bxn8YgE2vmWnrzBRX6ONYFXdiXtQrNW kq6AcXEpC1cejcu75sVx5iMahZ4S7ofWBJ5sYLFES59HA4ieJetY3argbcBJbiaVTGK8 kwpOQlj0e9y9/wwmANAEHPjVm3vXD1vhOxZpo321ZCkVRObxd3NK/G1aoOH7TN/ow8lp FkJvGs0SWJlRPMEmM9iV4fpg58wv96RGZr1XYi1Rb32RWPxDa0oVQ7g6fyKKajVq2x7H tTOw== 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=aTQ2WmgfLL0RKpED5qehF/7+sveySkG+bgQJgoV8etc=; b=EI2uRg1eIGQib5UF80A5fRm39In5FWRCFmolAP6A7A4y6TeG3U6SrzfIFoTfOjBFqS 5Aw/xVITBs2d5FM4hmiXqG9U1x+xZ22dSSM+NOqn5cYX2eXY5U956Jn4aZdg8TFyudbx 6PLXflZ+chgKce8YTq6IusoAhjh+BVjYS0/TlIRyZLGjYrxX9w2cvowHn1ZV/vQFjZjF waBREBgO+rXP/XCyh1PdBxqM3+w4XllDhBYOt0clqPO1yiNFpHFKyuOnHucSbLsJCrz0 C9IGabqH+5uaUVn3JJ2WMmGQO/EksOy0osrcZt3B5EIKXuBGHz/kCHhyPBa/in7opZIx fblg== X-Gm-Message-State: APjAAAWOV9CZZ3UopFTB9nTK8wXjgrcrWinArfINejFgk1nfXHdV36qR 7sw8zydcrVsdkgZBuNmytPHWTbYt X-Google-Smtp-Source: APXvYqxl5TYVfNvBXy/dz9DmCKkQnMlInal4tLsT88gN5/HW47YmGT1ZDLDexAyox8Jsc6xH/LByBw== X-Received: by 2002:a63:f04e:: with SMTP id s14mr2667068pgj.30.1575453261840; Wed, 04 Dec 2019 01:54:21 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id k101sm5941687pjb.5.2019.12.04.01.54.19 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Dec 2019 01:54:21 -0800 (PST) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org, baohua@kernel.org Subject: [PATCH 2/3] hwspinlock: sirf: Remove redundant PM runtime functions Date: Wed, 4 Dec 2019 17:53:32 +0800 Message-Id: <222255194cd40b48a0ec2b7e351eda0983b38acc.1575452516.git.baolin.wang7@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191204_015422_776910_28959DB6 X-CRM114-Status: GOOD ( 11.46 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:541 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (baolin.wang7[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (baolin.wang7[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: baolin.wang7@gmail.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Since the hwspinlock core has changed the PM runtime to be optional, and the SIRF hardware spinlock has no pm runtime requirement, thus remove these redundant PM runtime functions. Signed-off-by: Baolin Wang --- drivers/hwspinlock/sirf_hwspinlock.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/hwspinlock/sirf_hwspinlock.c b/drivers/hwspinlock/sirf_hwspinlock.c index 8cb5fd4..d62462e 100644 --- a/drivers/hwspinlock/sirf_hwspinlock.c +++ b/drivers/hwspinlock/sirf_hwspinlock.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +55,7 @@ static int sirf_hwspinlock_probe(struct platform_device *pdev) { struct sirf_hwspinlock *hwspin; struct hwspinlock *hwlock; - int idx, ret; + int idx; if (!pdev->dev.of_node) return -ENODEV; @@ -80,20 +79,9 @@ static int sirf_hwspinlock_probe(struct platform_device *pdev) platform_set_drvdata(pdev, hwspin); - pm_runtime_enable(&pdev->dev); - - ret = hwspin_lock_register(&hwspin->bank, &pdev->dev, - &sirf_hwspinlock_ops, 0, - HW_SPINLOCK_NUMBER); - if (ret) - goto reg_failed; - - return 0; - -reg_failed: - pm_runtime_disable(&pdev->dev); - - return ret; + return hwspin_lock_register(&hwspin->bank, &pdev->dev, + &sirf_hwspinlock_ops, 0, + HW_SPINLOCK_NUMBER); } static int sirf_hwspinlock_remove(struct platform_device *pdev) @@ -107,8 +95,6 @@ static int sirf_hwspinlock_remove(struct platform_device *pdev) return ret; } - pm_runtime_disable(&pdev->dev); - return 0; } From patchwork Wed Dec 4 09:53:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 11272659 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 807EB1593 for ; Wed, 4 Dec 2019 09:55:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 522C7206DB for ; Wed, 4 Dec 2019 09:55:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TIeCUluH"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CqEjAqBZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 522C7206DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=9NWDlc6S/yyqwYFOr+a6U8wopQxolOGGS6N3Vv+doMo=; b=TIeCUluH4OjpnDZNnkZtU2iobR iwpDJYrfk+tKxGwN8b0bZaQktnDr+4t/CAYHVUHMJQxo33Dl5kfIyt3Dw6/RGjvt5ZrrPfJBexPwD LgaYNTEpOcn4UC1KFIzMz74ZgN7ITeTk4qk75Gs2aFkdglIsyDdGfnM3iz5ueP7QAaTEJRDOXMHsQ p13leRHl0NX6N5RQak74e6yG5o2HkiEiMKgHquh2Eji0B37A3ARG16SYc9jE9mI9BNJJYe/is6g8I F8AzehQ7ZzvVHEtHJF5peghdwlPNLBjhpsJpbExkE+01MAxcQVOqLPwp1XXRFZhQvSGCqYdbYhF2B FRnCkuWg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1icRNC-0004vZ-NH; Wed, 04 Dec 2019 09:55:06 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1icRMY-00042Z-7T for linux-arm-kernel@lists.infradead.org; Wed, 04 Dec 2019 09:54:27 +0000 Received: by mail-pf1-x441.google.com with SMTP id x185so3390602pfc.5 for ; Wed, 04 Dec 2019 01:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=lK0hzpi7lOKx/+vwwnIUmfL08coFZ79d+GQbKJpzbuw=; b=CqEjAqBZI2DYUBa0fTauRtHIY9p7Cyi3RlaTmg430JUBYj9ae2a90oUMiq04AsaKEb FJ/CvBZHMW0we9ND+ppTbh7a8jhOz8Ce6oowvzKhqXBTYcof1eDT4TYvV1G14vfnU+oF jWagkHpYSNVBn0HFZNE778WdHRIYPIlM+zUQScXvOKqTc0LHMnjd+rP6uT/B5i6b6Rhx vMlG2tNtuQ6idKDd4XOKTw2O42qnCff69KiICKuapSSsFi/5VciM+9Q1nVq5ui1yrKUg D9hy4Ir9b3g/x/F8rpLcOagASOykjRa8emkQGiy02pA7bc+cTS9mGUHt8pcCXl1ZztgS sydg== 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=lK0hzpi7lOKx/+vwwnIUmfL08coFZ79d+GQbKJpzbuw=; b=PgTNc7DMRElp/orGEl5hchji1/4QpmT9KY7UZ1JDBdVpQz2dlTGtOkEAcyRYWJDyzd a0Kxj0P1X5g1ZQoYyU+Pd4PQmIhVz2AqeSdzskgurCizrRSDi9z01CrZvK52KigzeEoo 1CXIMtQ63t5tvxWaL6CzVcGLGcx7qB/p++4nWXRSNDl8s1YXzwbKmnLIn+FtsJrvKj4y Nq+SqyaCE4PZh3IGtpOmhPzlGLyEglhmDi5gkw0+et+gaC3gNe2f2uPjwXNCY0sRDG05 dlYWQmX57NpBWYK6NMHwwPdAMfLc1gOdT7zxb+T/2RrWY4x1HSOpugoI8GycixxtVf54 TVPg== X-Gm-Message-State: APjAAAXLd86ioFox6WZ/OJLn4M7EOBTW6Gdj1CLXrJP2exEKLpxzVBoq I9c/Egf7GJ0fymD/OXWBAZU= X-Google-Smtp-Source: APXvYqwj9EAIod5rI0TjevWy7FOFw+DSgYt6tnRhZdS6CK05vlUb7uUJci/Lp8NvAuIprbHSMdUe1Q== X-Received: by 2002:a63:7d6:: with SMTP id 205mr2613550pgh.131.1575453264820; Wed, 04 Dec 2019 01:54:24 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id k101sm5941687pjb.5.2019.12.04.01.54.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Dec 2019 01:54:24 -0800 (PST) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org, baohua@kernel.org Subject: [PATCH 3/3] hwspinlock: sirf: Use devm_hwspin_lock_register() to register hwlock controller Date: Wed, 4 Dec 2019 17:53:33 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191204_015426_428065_8817320A X-CRM114-Status: GOOD ( 12.84 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (baolin.wang7[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (baolin.wang7[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: baolin.wang7@gmail.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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/sirf_hwspinlock.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/hwspinlock/sirf_hwspinlock.c b/drivers/hwspinlock/sirf_hwspinlock.c index d62462e..823d3c4 100644 --- a/drivers/hwspinlock/sirf_hwspinlock.c +++ b/drivers/hwspinlock/sirf_hwspinlock.c @@ -79,23 +79,9 @@ static int sirf_hwspinlock_probe(struct platform_device *pdev) platform_set_drvdata(pdev, hwspin); - return hwspin_lock_register(&hwspin->bank, &pdev->dev, - &sirf_hwspinlock_ops, 0, - HW_SPINLOCK_NUMBER); -} - -static int sirf_hwspinlock_remove(struct platform_device *pdev) -{ - struct sirf_hwspinlock *hwspin = platform_get_drvdata(pdev); - int ret; - - ret = hwspin_lock_unregister(&hwspin->bank); - if (ret) { - dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret); - return ret; - } - - return 0; + return devm_hwspin_lock_register(&pdev->dev, &hwspin->bank, + &sirf_hwspinlock_ops, 0, + HW_SPINLOCK_NUMBER); } static const struct of_device_id sirf_hwpinlock_ids[] = { @@ -106,7 +92,6 @@ static int sirf_hwspinlock_remove(struct platform_device *pdev) static struct platform_driver sirf_hwspinlock_driver = { .probe = sirf_hwspinlock_probe, - .remove = sirf_hwspinlock_remove, .driver = { .name = "atlas7_hwspinlock", .of_match_table = of_match_ptr(sirf_hwpinlock_ids),