From nobody Thu Apr 9 19:25:43 2026 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F545384257 for ; Tue, 3 Mar 2026 19:31:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772566311; cv=none; b=kiMjBLRKXGOzMqHqkBkh3QSYVx4EPZkpsmIjjllZBCKABjTy6BJDLabGLOydeDQrVT7U9lKSibNDZJjzCqzEwGCRZCUe+SUli4WPtu3DHe5ngULF8aOIRZWHoax9yQUkEAGm/JmSzbEw5IgrkhzbW/his7/frnzaEs4INId86E4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772566311; c=relaxed/simple; bh=NQhzFPnhvDT7H608lK0YkvhIe1Wnm9jDBN/Mog6YZ14=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FAnlbpm5VgXAjI2VUx5DMN/1lV/wxb+WAV/sPK7fBwvz4dUmTxhXQpioZPBQcfLuORJu4ybdivEMIx2BtRiACVBROFyMt1pLNV4prQCO2kgE10RvKEjQ+bcw0RrJe0uQA5QKGbIiDuG2uMAd0cA6vKzxFH3fBMeYy/X9oL/Kecc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=QCmgyaIa; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="QCmgyaIa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=wuaGGcGzaS2IaPKApvffnT5mOe0N/0OwbJ4Ny2ad2Jk=; b=QCmgya Ia7SPftQYeGZRtCywsLDZCStg0epZjfFPXHw22CYNiY8hE9JRwb66VlX90hyTnqt lREZiCC9SsBaZcWtdFlUqnKkTtkRqO4t8FUpA+EK/yPnc7RIMfqW1HZb4qRqBrzZ Mv/zWriCmKsfXDYrIndXHwzCstrEuR6M6YXWGVeQwdkVMQtTTWpEM++v7PzlYkMM /y0OLTgoz/HybGsgPLkpFQNaBMc0+migmvddco2fvxY8g+wlcTE0lX7lkmx7WDTf ygdbovs9Zui6044sQ0ZiDh6HhIqXo75lHOc/5hJz+k0cN8rYnYuQngS4CqJ+F13y 0HMSvkoM1N8f4m2g== Received: (qmail 430566 invoked from network); 3 Mar 2026 20:31:31 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 3 Mar 2026 20:31:31 +0100 X-UD-Smtp-Session: l3s3148p1@zAMewCNMTpEujnu+ From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Wolfram Sang , Bjorn Andersson , Baolin Wang , linux-omap@vger.kernel.org, linux-remoteproc@vger.kernel.org Subject: [PATCH v3 05/15] hwspinlock: omap: use new callback to initialize hwspinlock priv Date: Tue, 3 Mar 2026 20:25:57 +0100 Message-ID: <20260303192600.7224-22-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260303192600.7224-17-wsa+renesas@sang-engineering.com> References: <20260303192600.7224-17-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Apply the new helper to avoid using internal structures from the core. Signed-off-by: Wolfram Sang --- drivers/hwspinlock/omap_hwspinlock.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap= _hwspinlock.c index adff502bcbc4..9a9cb3692348 100644 --- a/drivers/hwspinlock/omap_hwspinlock.c +++ b/drivers/hwspinlock/omap_hwspinlock.c @@ -66,10 +66,18 @@ static void omap_hwspinlock_relax(struct hwspinlock *lo= ck) ndelay(50); } =20 +static void *omap_hwspinlock_init_priv(int local_id, void *init_data) +{ + void __iomem *io_base_ofs =3D init_data; + + return io_base_ofs + sizeof(u32) * local_id; +} + static const struct hwspinlock_ops omap_hwspinlock_ops =3D { .trylock =3D omap_hwspinlock_trylock, .unlock =3D omap_hwspinlock_unlock, .relax =3D omap_hwspinlock_relax, + .init_priv =3D omap_hwspinlock_init_priv, }; =20 static int omap_hwspinlock_probe(struct platform_device *pdev) @@ -116,11 +124,8 @@ static int omap_hwspinlock_probe(struct platform_devic= e *pdev) if (!bank) return -ENOMEM; =20 - for (i =3D 0; i < num_locks; i++) - bank->lock[i].priv =3D io_base + LOCK_BASE_OFFSET + sizeof(u32) * i; - return devm_hwspin_lock_register(&pdev->dev, bank, &omap_hwspinlock_ops, - base_id, num_locks, NULL); + base_id, num_locks, io_base + LOCK_BASE_OFFSET); } =20 static const struct of_device_id omap_hwspinlock_of_match[] =3D { --=20 2.51.0