From patchwork Fri Jun 22 08:09:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 139585 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp583055lji; Fri, 22 Jun 2018 01:13:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKV4jJq8ao9AKw0TLk23FRKsQReOCC60yIwIxHzaVMfjlCht05QD/N+3btAUI/kGHcNSZlr X-Received: by 2002:a63:67c4:: with SMTP id b187-v6mr515574pgc.86.1529655181346; Fri, 22 Jun 2018 01:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529655181; cv=none; d=google.com; s=arc-20160816; b=lZqzqAZOKhP5wVzFDA9RB5Sm6Q3NtTKzL9E/hzQ5A9Xv1IGZgWWFcqe60txQTsmVyh 5Z/2Mz7EO2+04AGutKNkjdpYNND0MjmVRRj/z/UuPtSzIZ0VcxVhKq63IRt60BlZKi9i +f4VSaJg8sukpRbtXi690VFkZV3LTuBG2kQijRGMnzj9aXRcIOVSY2KDuwqZ/o8AsBtV rMFtw+ux85WzEHzqljmaqkYWjUQTsdu7cDDOod0lPXiHK2qeilozAPVR5zec02MZIV3T SK9wkaoVku3Uyj5/Fi5sjXJiagYTHd2eV+jM361s7BhNs32d0f2XrjHWe2ucTOHj538C rdhQ== 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 :arc-authentication-results; bh=0Tzpf9ziKr+g+hROmT1grV3fdzAFs7fX02E9A7Xg4ZM=; b=DT3Se78pKwdqLC125c4fNmNrdjoLYYxxoOyvnkZ1EqS5O48Armzk+qidf1rd9q1bRK KM9khk+zncklUWwlXqlr0sFhx3hQpInNjUIHvaETsJeNW6fxGt3Xs8YKZwgZMhvZyE66 PQd0XDq960DT3ifhwIxa57nNut7RyJlaszeEMRQk7ljmEo+CYaDOtwLwtpa6OAvljgzV EWix7j/KgQejaGO5w5winOKlebogEUM+2kJVYA20FFjYjExvRUpQYUOPqQ4qrW47pr8s TZeZPRW7YhUMEo+qyFeizxVXJsRZ0M/m96CrUpVoRFbTe4GH+7Z++OKShQO5So+zpCdr s9sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HEnnXQGl; 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 g187-v6si4730231pgc.111.2018.06.22.01.13.01; Fri, 22 Jun 2018 01:13:01 -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=HEnnXQGl; 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 S1754260AbeFVIKF (ORCPT + 30 others); Fri, 22 Jun 2018 04:10:05 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:40575 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751263AbeFVIJ7 (ORCPT ); Fri, 22 Jun 2018 04:09:59 -0400 Received: by mail-pf0-f193.google.com with SMTP id z24-v6so2838904pfe.7 for ; Fri, 22 Jun 2018 01:09:59 -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=0Tzpf9ziKr+g+hROmT1grV3fdzAFs7fX02E9A7Xg4ZM=; b=HEnnXQGlLutVmWD43oi6ceJzSCpIhb3RZy3tm9zT+XhTUKcW+b3PQpiLGunqUzvgsn 3a/PQUSpkZJ/kprN/hGLvCZ3YeRop1ex0U7IdA2DCMU+AvpHCa7Og4VSZW+DUOSm3Tmj gL5s/eWARXTGSnix3CB7n7a0kvAnNCPeMelZU= 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=0Tzpf9ziKr+g+hROmT1grV3fdzAFs7fX02E9A7Xg4ZM=; b=k9KbYI4AaxreA86wF2H154qY6a/bp6Q67wPrVoTuTHgKRN3q9DSZzXGrHHN3tA9C7x xbOy5TnKPTNebVF40CEbaPhb1fIDpZGufeaqCP4RwqEZ/VdphHyVucVjwhx9CbH2p/gt w/n/tl2uyGjJP/hI2g2+70V2QSx/8VVH7VEs7IgLufjLNN4GCGMHp0VhXzCyK1OnKb49 OLrLOl1SxF0NKMfnLzJzQvVwsYWfcLNOh5xl0zHf9+baUXMrpUdcHO5uOt8MDZFc3WkF 9Ejfma/AmzLl2VG4P3Diy5TeJX6klKhn12eOMxhwv3OekC99pmg5WclyWfFj68YH1j+d pLGw== X-Gm-Message-State: APt69E171o2BsIukbV6jPZ1JcHWhM0TTketrw8BgyHeAc6d+PhOfSf+f zdJ2JV4v+Q1AwwasdyNOxCfN3w== X-Received: by 2002:a63:78c6:: with SMTP id t189-v6mr482034pgc.239.1529654998951; Fri, 22 Jun 2018 01:09:58 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i65-v6sm22656131pfd.17.2018.06.22.01.09.56 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Jun 2018 01:09:58 -0700 (PDT) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org, broonie@kernel.org Cc: baolin.wang@linaro.org, linux-spi@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/8] hwspinlock: Add devm_xxx() APIs to register/unregister one hwlock controller Date: Fri, 22 Jun 2018 16:09:00 +0800 Message-Id: <52f3abc65549f6b412587a2c5938ee1347bccde7.1529654288.git.baolin.wang@linaro.org> 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 This patch introduces devm_hwspin_lock_register() and devm_hwspin_lock_unregister() interfaces to help to register or unregister one hardware spinlock controller, that will help to simplify the cleanup code for hwspinlock drivers. Signed-off-by: Baolin Wang --- drivers/hwspinlock/hwspinlock_core.c | 82 ++++++++++++++++++++++++++++++++++ include/linux/hwspinlock.h | 6 +++ 2 files changed, 88 insertions(+) -- 1.7.9.5 diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c index d542b6f..ba27465 100644 --- a/drivers/hwspinlock/hwspinlock_core.c +++ b/drivers/hwspinlock/hwspinlock_core.c @@ -529,6 +529,88 @@ int hwspin_lock_unregister(struct hwspinlock_device *bank) } EXPORT_SYMBOL_GPL(hwspin_lock_unregister); +static void devm_hwspin_lock_unreg(struct device *dev, void *res) +{ + hwspin_lock_unregister(*(struct hwspinlock_device **)res); +} + +static int devm_hwspin_lock_device_match(struct device *dev, void *res, + void *data) +{ + struct hwspinlock_device **bank = res; + + if (WARN_ON(!bank || !*bank)) + return 0; + + return *bank == data; +} + +/** + * devm_hwspin_lock_unregister() - unregister an hw spinlock device for + * a managed device + * @dev: the backing device + * @bank: the hwspinlock device, which usually provides numerous hw locks + * + * This function should be called from the underlying platform-specific + * implementation, to unregister an existing (and unused) hwspinlock. + * + * Should be called from a process context (might sleep) + * + * Returns 0 on success, or an appropriate error code on failure + */ +int devm_hwspin_lock_unregister(struct device *dev, + struct hwspinlock_device *bank) +{ + int ret; + + ret = devres_release(dev, devm_hwspin_lock_unreg, + devm_hwspin_lock_device_match, bank); + WARN_ON(ret); + + return ret; +} +EXPORT_SYMBOL_GPL(devm_hwspin_lock_unregister); + +/** + * devm_hwspin_lock_register() - register a new hw spinlock device for + * a managed device + * @dev: the backing device + * @bank: the hwspinlock device, which usually provides numerous hw locks + * @ops: hwspinlock handlers for this device + * @base_id: id of the first hardware spinlock in this bank + * @num_locks: number of hwspinlocks provided by this device + * + * This function should be called from the underlying platform-specific + * implementation, to register a new hwspinlock device instance. + * + * Should be called from a process context (might sleep) + * + * Returns 0 on success, or an appropriate error code on failure + */ +int devm_hwspin_lock_register(struct device *dev, + struct hwspinlock_device *bank, + const struct hwspinlock_ops *ops, + int base_id, int num_locks) +{ + struct hwspinlock_device **ptr; + int ret; + + ptr = devres_alloc(devm_hwspin_lock_unreg, sizeof(*ptr), GFP_KERNEL); + if (!ptr) + return -ENOMEM; + + ret = hwspin_lock_register(bank, dev, ops, base_id, num_locks); + if (!ret) { + *ptr = bank; + devres_add(dev, ptr); + } else { + devres_free(ptr); + } + + return ret; +} +EXPORT_SYMBOL_GPL(devm_hwspin_lock_register); + /** * __hwspin_lock_request() - tag an hwspinlock as used and power it up * diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock.h index dfd0593..94064cc 100644 --- a/include/linux/hwspinlock.h +++ b/include/linux/hwspinlock.h @@ -71,6 +71,12 @@ int __hwspin_lock_timeout(struct hwspinlock *, unsigned int, int, struct hwspinlock *devm_hwspin_lock_request(struct device *dev); struct hwspinlock *devm_hwspin_lock_request_specific(struct device *dev, unsigned int id); +int devm_hwspin_lock_unregister(struct device *dev, + struct hwspinlock_device *bank); +int devm_hwspin_lock_register(struct device *dev, + struct hwspinlock_device *bank, + const struct hwspinlock_ops *ops, + int base_id, int num_locks); #else /* !CONFIG_HWSPINLOCK */ From patchwork Fri Jun 22 08:09:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 139581 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp580631lji; Fri, 22 Jun 2018 01:10:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJL8kJN00Udf6fEa2YIVY9nYtP7zeWp61o2JXtnHkvx3Sb9GXHsLcXPfWLPRH7kF6UGA5Eo X-Received: by 2002:a17:902:4545:: with SMTP id m63-v6mr620705pld.268.1529655012029; Fri, 22 Jun 2018 01:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529655012; cv=none; d=google.com; s=arc-20160816; b=RFrR9z4vvNle21NRoyYxp6LylxXD6wLC9ZY4TG3ctWCE/OsjBj/qGobpyuXcgWcuOx u714XWazUI40RlWr6v3uWHlkrghkF/Mzeo/bl4VCktrLqEqZ7XSzSEvodIDghiQcs+n6 SIWibDtbs6b1OI7Jn+wp3Wi9ESYi1l0woUTTzkzsfXigz+mQOJFuq8twJVkrjNN2VPF2 FCkYjnJ2ljAZ/16mDkO3t2DRD0LCAnNtJKgFT3kdu0OxLM6fhZknVkUfCBcvHYAHeXq1 +Kiwo6Gco/1hITdDk5yyNgKZr021bnqLs+p06OddkmehAcak42U8zcABeBpWNB1PW20i ySnw== 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 :arc-authentication-results; bh=UOdkApVVBA+z4FyuVcx5+Va8JRtm2Zu3pthKkD+YL98=; b=A84jm4iX/nZHQyypfJwNU/0LQ71XfBkqYfuuqBzu6xJJHEcM+QzE38Ph1RnYHhs9QG t0/PBmecZb3tNCJO9bK00IsEDliLmCRu3b4o/n0/7VcI9zqKK+q8HhvNQXFimNdlmyCj I/kWLrYH63odrZbxFV01LNpdpkWu9jI5sdCPqRs9zEU9c1g8o/cBy4cbkY3eGbB1Pbtl obBG8cOzh3CSsLMnRkK42u9QKUowmdNlCUBNuBWyWfOq4C7XWnMBFl3+wYZwlkPYdyZp VxNgQ/i71D+/23GRNEwKWChLECx/8TKMd8vIXMWPPJ74DEgW9M7+2BltU9n5gWA96yvg fyZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OsoA7xBW; 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 r8-v6si8100476plj.40.2018.06.22.01.10.11; Fri, 22 Jun 2018 01:10:12 -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=OsoA7xBW; 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 S1754295AbeFVIKH (ORCPT + 30 others); Fri, 22 Jun 2018 04:10:07 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:33431 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754173AbeFVIKC (ORCPT ); Fri, 22 Jun 2018 04:10:02 -0400 Received: by mail-pl0-f68.google.com with SMTP id 6-v6so3111502plb.0 for ; Fri, 22 Jun 2018 01:10:02 -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=UOdkApVVBA+z4FyuVcx5+Va8JRtm2Zu3pthKkD+YL98=; b=OsoA7xBWvV27vxKUrsD2CDeNCrdnaaAfqqOKMk4RNQr+ZIMJ9Q8k42h1xEeWeXON3c 6+E5f2dLG/4hbIhBgaI3heMEEajkGBLFozNMwjKrjR4Ami+RUfskpuqWrK/nxRoc2R7X V38J4MzNBi6um5MiB8pZ7xvkTZ9ghc8C7ibWg= 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=UOdkApVVBA+z4FyuVcx5+Va8JRtm2Zu3pthKkD+YL98=; b=g0I7CvUOTfeLUychLNeOBFjOYpJQaheWqyT+mHGSCO8m4YUCaoYwsoTVfBM0itvWhI eY1uIHTgftqgpD5h5Nuv7RMYstFDMdZhKaxjzUZsgoAgNaYdmqrXnepcr070oQSYY/Ob DrVF38wxIF6vJyN/11k56GLXAJcNJZyf+P73V3XVsyg6LEMgMTlvcARvf1o19QbbLHOW it05QQ5eiGWFCOTmfJTR0Yq9WBe224zwYq5+GriwNUEz0DC18UeM01hcz8GmfLCD68Dk B6v0lYaJP5eFpS/rhzPYAnUqKiEyH6ncrvmagGwLKKln7nPL3Yb086poqwYoFNQKg6eH 2yfg== X-Gm-Message-State: APt69E3ukC7ATrrxFTEkZ54uD35r5HgH3UkxjLFzK1BNnMIG+BQx2GH9 of711ZGsJs7D9SRqn1ByiKL7DQ== X-Received: by 2002:a17:902:aa83:: with SMTP id d3-v6mr576991plr.323.1529655002093; Fri, 22 Jun 2018 01:10:02 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i65-v6sm22656131pfd.17.2018.06.22.01.09.59 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Jun 2018 01:10:01 -0700 (PDT) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org, broonie@kernel.org Cc: baolin.wang@linaro.org, linux-spi@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/8] hwspinlock: Remove redundant config Date: Fri, 22 Jun 2018 16:09:01 +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 The hardware core can not be built as a module, so remove the redundant CONFIG_HWSPINLOCK_MODULE config. Signed-off-by: Baolin Wang --- include/linux/hwspinlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.7.9.5 diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock.h index 94064cc..0afe693 100644 --- a/include/linux/hwspinlock.h +++ b/include/linux/hwspinlock.h @@ -52,7 +52,7 @@ struct hwspinlock_pdata { int base_id; }; -#if defined(CONFIG_HWSPINLOCK) || defined(CONFIG_HWSPINLOCK_MODULE) +#ifdef CONFIG_HWSPINLOCK int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev, const struct hwspinlock_ops *ops, int base_id, int num_locks); From patchwork Fri Jun 22 08:09:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 139586 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp583071lji; Fri, 22 Jun 2018 01:13:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLK8mFfkioLlGZUEIUIRU2j8kD1KByXrykcod/QkKppJYGqNNP7WmFnBEpBGm3n6DxGX70H X-Received: by 2002:a63:7206:: with SMTP id n6-v6mr514621pgc.174.1529655183663; Fri, 22 Jun 2018 01:13:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529655183; cv=none; d=google.com; s=arc-20160816; b=r56p70fFiS+CW15wLa4WDjNGDDjC7vxnD/oqNqbB9Q4hEnGvcPMm8+N3WZMS6q8vTQ IYF2orrJajql6Y3m2m9uH5g3YmqehW0+pkAlSZHD1YIh9S5wtF8BaO2NB4d7mDA3erOV g2zq5Xjlf5roB/Zhg7xYDd8x3l6DB+FMQ8v2w470euY8+mNsogeMDcFuZPwodlYU00fY ya+bvcUGppbfFzxf4UUgh+utMUZhHtuGqF2QFQkoWJ/KN8fP8ht+LGJQ5YyLOGYxWnEf 6GDu2hWj0R8lylX7L3B6pKekKjegWoHqGtXyEzIEm4q2X9NSSWYS4dxDfScuh7cnlKb0 DMvQ== 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 :arc-authentication-results; bh=C00iri9Dth9hE8CWwVUI5JRBbcabRyVj9MDYk2bFR2Y=; b=fAOkFDObWsbRBoMBgTptag/k9ywyRNkiV2qgQQB5ZeCeWobKofTSGALOlAVrucIXL+ qkns3IDaMPxnSw1uhuXGdj2o8kt3bpBdZLqM8gegwNb3kTeOcGbAWB4uHHYO4wjuYMw5 qJ6liTOdROp6QhAfLdJk0SJGAidW32lJuqqvL0c1gOdzveqCy0tMQnf0fmccphzDL5x5 7JYmXORlOQXN4nCq4kbqEePbvVsRWcwDXtZvNmvnNKvfQGYfIIpplEo77ykYfCmgFJ3Z HaIGmRjh9LNfqbNcpT3X7ZxfNweRD0dfwoSPV3c2/yzak5535gwUZzwjJ+ckER6KWOa9 66rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eTKr94d0; 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 g187-v6si4730231pgc.111.2018.06.22.01.13.03; Fri, 22 Jun 2018 01:13:03 -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=eTKr94d0; 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 S933354AbeFVINA (ORCPT + 30 others); Fri, 22 Jun 2018 04:13:00 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:47009 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754252AbeFVIKF (ORCPT ); Fri, 22 Jun 2018 04:10:05 -0400 Received: by mail-pl0-f68.google.com with SMTP id 30-v6so3090413pld.13 for ; Fri, 22 Jun 2018 01:10:05 -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=C00iri9Dth9hE8CWwVUI5JRBbcabRyVj9MDYk2bFR2Y=; b=eTKr94d0v/SCt8CD6+8W01iJQeyvl7llVoz3NFsqJWPtFRw5T9x/kstQKC61REHO/A gljhOR1fx2QmQKXpieDUb5c60DUrMZq4LwgwUjocx50MQQ8wTO/I5p0C+lcADoe2gB38 Hm1snOK3gHFWUdglb+IGbeHBSfBlubLa7XUbk= 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=C00iri9Dth9hE8CWwVUI5JRBbcabRyVj9MDYk2bFR2Y=; b=PuAzrVcY8piGG5qnFscnQ2xpbWwKqZrQby8Zh/S70Vm5QxsyLpvdy5VPNQbYqOPu24 p8RuWqSXiPx2Pxd1h0MDXmkI4YLCAVR9qV3jtrFdYZWc2/SfWFzTq9hOPuksKSR4YMuN LSzLLMjwhgRiSL+jbkh5TC7+5DCysVFuvhdO1vGQOOaB7gX50aF2mUuW/u2s3yh1sxdc zmyJfu4qAEE3RrEA3Kr6DSQS3Q2cCXGvVpdLcJbyK/RJpC/RXmMVicerhWzXP+UJKMt1 XE2sQT836ElA4wpQjWqAHxh7eE0FrF1OHAeSIpEEhJnCxJ/g1zLq0+OT+Yc9HIPhVsZX O07w== X-Gm-Message-State: APt69E3zJ3EUhgIuwYOjV2jg7mqxxBOcgXd9DtAtme9STM1hAP0rDSUu EEE8+j5NHL7vJ3LIMh+0ai3PeA== X-Received: by 2002:a17:902:4c:: with SMTP id 70-v6mr620943pla.178.1529655005235; Fri, 22 Jun 2018 01:10:05 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i65-v6sm22656131pfd.17.2018.06.22.01.10.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Jun 2018 01:10:04 -0700 (PDT) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org, broonie@kernel.org Cc: baolin.wang@linaro.org, linux-spi@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/8] hwspinlock: Fix one comment mistake Date: Fri, 22 Jun 2018 16:09:02 +0800 Message-Id: <215e82a652063b244e0892829a204b3da5a69056.1529654288.git.baolin.wang@linaro.org> 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 Fix one comment mistake with correct function names. Signed-off-by: Baolin Wang --- drivers/hwspinlock/hwspinlock_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.7.9.5 diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c index ba27465..e16d648 100644 --- a/drivers/hwspinlock/hwspinlock_core.c +++ b/drivers/hwspinlock/hwspinlock_core.c @@ -767,7 +767,7 @@ struct hwspinlock *hwspin_lock_request_specific(unsigned int id) * * This function mark @hwlock as free again. * Should only be called with an @hwlock that was retrieved from - * an earlier call to omap_hwspin_lock_request{_specific}. + * an earlier call to hwspin_lock_request{_specific}. * * Should be called from a process context (might sleep) * From patchwork Fri Jun 22 08:09:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 139582 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp580719lji; Fri, 22 Jun 2018 01:10:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKebQV1Zr05C3dUALecDVqQncEZpNyFsdwR712d4fBCQ5mv+8j4MAdSkGcLcHgMzLcAgxkI X-Received: by 2002:a17:902:b110:: with SMTP id q16-v6mr615246plr.286.1529655018661; Fri, 22 Jun 2018 01:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529655018; cv=none; d=google.com; s=arc-20160816; b=qylxiCxJ+W9q4IurT5K8uqFsT7OR75q4eoUH2c7ASrmruvUkHATARNyrM0pbR5ryvi yr3i7CvFL49yNWmD/bpSkhMxpVoDnSpazRhPq44lZ/AGkGDS0UtSZ8nqm6/usWnL78me FCkK05QMRaeelqbp/VUi+ijM2ebuMmfkeijw+VK/Ukf3nhSkMGjCAS2XQJH8cYJPcRme WCbwDPFvuhnymM/7GPgNUdFH3Oejp01Moopd1Y43aBp+yylpvZktvE+VoIimY51mnPol 0utbDK914h8zrEGkp/XAAmjN1ta5MxCZa9RYOWNsh+cZmellarw6HW3I+0ePdReMvMON 2Kww== 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 :arc-authentication-results; bh=3A44ZW7qxPj/iWo29IiZBe5Y14C0QOYeV6oTMiK0IKY=; b=pjVYYfl5KyFt4V5ssS4C17KZdF3UiPaYoYB6Rcmj5/g4UXnzJur5f1XeRiAcluQpdX U1IlFyU181Syi65GlAJGex0HatNzS6cEe+toWikAKF346uKYGFsgaEJpfn7450c4igsy i6CgHC/zKcMNB+NAAxweGVYUK0dvaK+/+4Tjw9jduSJfcpaJPleegDN0yKg7gBrwQW2i TO2oE9Q/DjdNCwFGcCoLbFmjGa1ITmNNz6W3rbNBDRwOwUS4P5x6pPB53oB8U/2fdT3X XgdIcgUY2SaqrMOHcm2exkg7onAag+3XtiQr/D//kPZlIruOn+bLqzErQPEpgMRJTGMM j3vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cYqMykKJ; 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 r8-v6si8100476plj.40.2018.06.22.01.10.18; Fri, 22 Jun 2018 01:10:18 -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=cYqMykKJ; 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 S1754283AbeFVIKO (ORCPT + 30 others); Fri, 22 Jun 2018 04:10:14 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:36487 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754296AbeFVIKJ (ORCPT ); Fri, 22 Jun 2018 04:10:09 -0400 Received: by mail-pl0-f66.google.com with SMTP id a7-v6so3105669plp.3 for ; Fri, 22 Jun 2018 01:10:08 -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=3A44ZW7qxPj/iWo29IiZBe5Y14C0QOYeV6oTMiK0IKY=; b=cYqMykKJ4kpv86+XOjlmZ57QrIazkeVKzNSrJZK62txV1rlRR/ttjU6bYzxuE+dQ7t 3kx7+hi0XQm0UXQS3CQMJhrNRQLsAysAJbPIH5+ia79wBtFKRZOLvSMxTmElgNgAgPbN J19yV+UGCT0JfMxWWyME+579KAMQ5dwQleoHo= 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=3A44ZW7qxPj/iWo29IiZBe5Y14C0QOYeV6oTMiK0IKY=; b=P+/WCivXrSp7yeQZ3U9tBXPOUrT4F0eNKtcmQpXdLWl1XXekpfzQqCPhyF64X7k4g6 pRToNRufGfViQTR1C6nIRn6vXpsbLbenTwK1qHkoSuIjzEf5YqpbTh3pAuaERrbhHsZR LRR0ep549MJv4z4k6ph8LsBxlyoeLjZcwSyN/KtqNUdmEDYjsNdswsIWWjF48fXOqr94 QYR7hzzxoNsbnYsKk3B1nyLfTxBtneqyEpKQ8uURiJ28Y1UDcoq6gY38JWIXu9uBazXL wOWEDlJkRQO/3sjtHIXRpC1Znh69z7dmCrF6/MbvrkRF+WUYZDm/J0suQQQENJZS4kpt M7DQ== X-Gm-Message-State: APt69E29wwV/873pgvZKDdELhx01KdtMr1EP3XcQVd7JdQ1UiV/JtAvC UuamXzb4t66RcE9v0aXLPJrIdQ== X-Received: by 2002:a17:902:88:: with SMTP id a8-v6mr607893pla.156.1529655008639; Fri, 22 Jun 2018 01:10:08 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i65-v6sm22656131pfd.17.2018.06.22.01.10.05 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Jun 2018 01:10:08 -0700 (PDT) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org, broonie@kernel.org Cc: baolin.wang@linaro.org, linux-spi@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/8] hwspinlock: sprd: Use devm_hwspin_lock_register() Date: Fri, 22 Jun 2018 16:09:03 +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 to avoid unregistering the device explicitly. Signed-off-by: Baolin Wang --- drivers/hwspinlock/sprd_hwspinlock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.7.9.5 diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c index dc42bf5..ba5daf6 100644 --- a/drivers/hwspinlock/sprd_hwspinlock.c +++ b/drivers/hwspinlock/sprd_hwspinlock.c @@ -120,8 +120,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); clk_disable_unprepare(sprd_hwlock->clk); @@ -135,7 +136,6 @@ 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); clk_disable_unprepare(sprd_hwlock->clk); return 0; From patchwork Fri Jun 22 08:09:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 139584 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp581530lji; Fri, 22 Jun 2018 01:11:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKslGjfM2cC29tiiPvSDYM0hjMl7vQ1xJmlyGRrRHhv9NORkUm818hbj5Tg8Gt7aTfeNjUA X-Received: by 2002:a62:dc1c:: with SMTP id t28-v6mr636547pfg.137.1529655073419; Fri, 22 Jun 2018 01:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529655073; cv=none; d=google.com; s=arc-20160816; b=DgZwqxJFtjzDVbKIphjp22K50042MoGUo9IbGYao4452N+COCLvHoiwVO1kcuZCJEi DiPDmsFKc5cSYbdz8cWo0BwYAtYoF2+/e58t+ggSk2Uu/7mQdMIQ39+U0QQnMFm7SKxk i670GeKTts5B5uXDkLKlNGoD5BWhvNo5lj3M8wnj2pIeku6Zx9b9b4nyKvFSTz5um3q8 BiF7QjX3E2YbPjqrMAaNkpXxLGDxkBCRkFBvAzxET+ZEoy28lTjXo+SLovtqq4BmM2IP tOydHvfNsNC/N9b9YJ4Aeg+0NKKXcOfWI8dp2FFJgkiFFdh6oA/ZCme8q83+q7yqLWcD xEzQ== 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 :arc-authentication-results; bh=mKiddEQWBDsjx6NRHIvvE6IftcVqW5H+YgW4bj7RSJU=; b=ayWKs9dNXr1aiLmU220xtFSg1GSUnV3CqwqVQwfMMi4vPWrus7nt1RyNSLlsj0zJb1 /YVt42Hwdlyeamsa1BOLNW16X1FwZY27K8LGHpiU1YKnhfw33syRcRkY357Fx9FNVhGl nWCaOWBvpzXYg5JVDwnyliCzcMVWuK/q0Ic0kkFO6hqjlF3I19AZvwr8o//8GVqpMmoP 9od7ON0ptCaPb8cfZ9dWlyKO9XYbiwNhIY6wZXnKvfTUHTI7jTBmE/ZXOPABB/HmR+ar 7ikVSlo5rwi+yhv3P6cFWb9Jn7tmqIM0R0tOjvyMZhVfOQ7fQV9zfo7fmVQe5S1Y80cY /d6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HNs0NXN6; 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 b8-v6si7338521plb.125.2018.06.22.01.11.13; Fri, 22 Jun 2018 01:11: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=pass header.i=@linaro.org header.s=google header.b=HNs0NXN6; 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 S1754389AbeFVILK (ORCPT + 30 others); Fri, 22 Jun 2018 04:11:10 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34293 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752611AbeFVIKM (ORCPT ); Fri, 22 Jun 2018 04:10:12 -0400 Received: by mail-pg0-f66.google.com with SMTP id q4-v6so2640767pgr.1 for ; Fri, 22 Jun 2018 01:10:12 -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=mKiddEQWBDsjx6NRHIvvE6IftcVqW5H+YgW4bj7RSJU=; b=HNs0NXN6Ng8OmwqRMgMlx0l9e1Zs/10ib/zbBHfhdtugYJKZbbRvtwggReBmZy4GI+ 6Wr5O7tW+/nmqjILFWA7yFLcna+4Wuf1/RkUZS2mFFZ1J+jK/vOiXpziNMCvjOnf43he nVdA8RSqQIG7nGptRsZE9nHYxi6Aqilcqlb5c= 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=mKiddEQWBDsjx6NRHIvvE6IftcVqW5H+YgW4bj7RSJU=; b=tm7fW08K32IcR6mq4UC2z6kl4zmEvKKKb7JtAQl1Pce4wdTrC5M50yPesCXEFTaBRm gGBtGcwDS9FrPmA2ctbXm7B0Yk/L/UZJa+SZx6+8Zv3Ubp3EHsbQ8K23viFQlvDxi1ME 7d0bJl5Y9qe+vPDbqvOUTADC3BnnjOtaPFXeOSrBhrvc/E4Sie8gF15Zdzu3bFd520fi 3QcuplPkzYLCYR4evsaXngqCbe6U0wYSeVkRDpOYIQUfg8oxPesifTOfkJ8ZBOPnnmD+ bOwiJWjTYlK0Yj6Kj5nynMpS3PyNumf9ntkG4D4T0ZSR9PvsPrqfR3wt00vGDgfYJEtu PJIQ== X-Gm-Message-State: APt69E3RQGG9zy98XMc+tz1WT7kIC4Ax86tYA7e4LlHEYkm7y3xmr8MD 9Hb8dL5lr/DlzAnN6RTIsLgOJw== X-Received: by 2002:a62:e117:: with SMTP id q23-v6mr645775pfh.75.1529655011469; Fri, 22 Jun 2018 01:10:11 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i65-v6sm22656131pfd.17.2018.06.22.01.10.08 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Jun 2018 01:10:11 -0700 (PDT) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org, broonie@kernel.org Cc: baolin.wang@linaro.org, linux-spi@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/8] spi: sprd: Replace of_hwspin_lock_get_id() with of_hwspin_lock_get_id_byname() Date: Fri, 22 Jun 2018 16:09:04 +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 Now the hwlock core has supplied new function to get a specific hwlock id by one hwlock name, which is more clear for users. So change to use of_hwspin_lock_get_id_byname(). Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd-adi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.7.9.5 Acked-by: Mark Brown diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c index 6fc50cf..d8d5e2f 100644 --- a/drivers/spi/spi-sprd-adi.c +++ b/drivers/spi/spi-sprd-adi.c @@ -459,7 +459,7 @@ static int sprd_adi_probe(struct platform_device *pdev) sadi->slave_pbase = res->start + ADI_SLAVE_OFFSET; sadi->ctlr = ctlr; sadi->dev = &pdev->dev; - ret = of_hwspin_lock_get_id(np, 0); + ret = of_hwspin_lock_get_id_byname(np, "adi"); if (ret < 0) { dev_err(&pdev->dev, "can not get the hardware spinlock\n"); goto put_ctlr;