mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-renesas-soc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	linux-remoteproc@vger.kernel.org
Subject: [PATCH v5 12/15] hwspinlock: remove internal header
Date: Thu, 19 Mar 2026 11:59:34 +0100	[thread overview]
Message-ID: <20260319105947.6237-13-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20260319105947.6237-1-wsa+renesas@sang-engineering.com>

Because the internal header is now used by the core only, it can also be
merged into source file itself. The header was small enough.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/hwspinlock/hwspinlock_core.c     | 31 +++++++++++++++-
 drivers/hwspinlock/hwspinlock_internal.h | 46 ------------------------
 2 files changed, 30 insertions(+), 47 deletions(-)
 delete mode 100644 drivers/hwspinlock/hwspinlock_internal.h

diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
index e0227d027cf2..838bb2ab5eba 100644
--- a/drivers/hwspinlock/hwspinlock_core.c
+++ b/drivers/hwspinlock/hwspinlock_core.c
@@ -10,6 +10,7 @@
 #define pr_fmt(fmt)    "%s: " fmt, __func__
 
 #include <linux/delay.h>
+#include <linux/device.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
@@ -23,7 +24,35 @@
 #include <linux/of.h>
 #include <linux/slab.h>
 
-#include "hwspinlock_internal.h"
+struct hwspinlock_device;
+
+/**
+ * struct hwspinlock - this struct represents a single hwspinlock instance
+ * @bank: the hwspinlock_device structure which owns this lock
+ * @lock: initialized and used by hwspinlock core
+ * @priv: private data, owned by the underlying platform-specific hwspinlock drv
+ */
+struct hwspinlock {
+	struct hwspinlock_device *bank;
+	spinlock_t lock;
+	void *priv;
+};
+
+/**
+ * struct hwspinlock_device - a device which usually spans numerous hwspinlocks
+ * @dev: underlying device, will be used to invoke runtime PM api
+ * @ops: platform-specific hwspinlock handlers
+ * @base_id: id index of the first lock in this device
+ * @num_locks: number of locks in this device
+ * @lock: dynamically allocated array of 'struct hwspinlock'
+ */
+struct hwspinlock_device {
+	struct device *dev;
+	const struct hwspinlock_ops *ops;
+	int base_id;
+	int num_locks;
+	struct hwspinlock lock[];
+};
 
 /* retry delay used in atomic context */
 #define HWSPINLOCK_RETRY_DELAY_US	100
diff --git a/drivers/hwspinlock/hwspinlock_internal.h b/drivers/hwspinlock/hwspinlock_internal.h
deleted file mode 100644
index 20ae531fc389..000000000000
--- a/drivers/hwspinlock/hwspinlock_internal.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Hardware spinlocks internal header
- *
- * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com
- *
- * Contact: Ohad Ben-Cohen <ohad@wizery.com>
- */
-
-#ifndef __HWSPINLOCK_HWSPINLOCK_H
-#define __HWSPINLOCK_HWSPINLOCK_H
-
-#include <linux/spinlock.h>
-#include <linux/device.h>
-
-struct hwspinlock_device;
-
-/**
- * struct hwspinlock - this struct represents a single hwspinlock instance
- * @bank: the hwspinlock_device structure which owns this lock
- * @lock: initialized and used by hwspinlock core
- * @priv: private data, owned by the underlying platform-specific hwspinlock drv
- */
-struct hwspinlock {
-	struct hwspinlock_device *bank;
-	spinlock_t lock;
-	void *priv;
-};
-
-/**
- * struct hwspinlock_device - a device which usually spans numerous hwspinlocks
- * @dev: underlying device, will be used to invoke runtime PM api
- * @ops: platform-specific hwspinlock handlers
- * @base_id: id index of the first lock in this device
- * @num_locks: number of locks in this device
- * @lock: dynamically allocated array of 'struct hwspinlock'
- */
-struct hwspinlock_device {
-	struct device *dev;
-	const struct hwspinlock_ops *ops;
-	int base_id;
-	int num_locks;
-	struct hwspinlock lock[];
-};
-
-#endif /* __HWSPINLOCK_HWSPINLOCK_H */
-- 
2.51.0


  parent reply	other threads:[~2026-03-19 11:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 10:59 [PATCH v5 00/15] hwspinlock: move device alloc into core and refactor includes Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 01/15] hwspinlock: u8500: delete driver Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 02/15] hwspinlock: remove now unused pdata from header file Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 03/15] hwspinlock: add helpers to retrieve core data Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 04/15] hwspinlock: add callback to fill private data of a hwspinlock Wolfram Sang
2026-03-19 13:07   ` Chen-Yu Tsai
2026-03-19 10:59 ` [PATCH v5 05/15] hwspinlock: omap: use new callback to initialize hwspinlock priv Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 06/15] hwspinlock: qcom: " Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 07/15] hwspinlock: sprd: " Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 08/15] hwspinlock: stm32: " Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 09/15] hwspinlock: sun6i: " Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 10/15] hwspinlock: handle hwspinlock device allocation in the core Wolfram Sang
2026-03-19 13:09   ` Chen-Yu Tsai
2026-03-19 10:59 ` [PATCH v5 11/15] hwspinlock: move entries from internal to public header Wolfram Sang
2026-03-19 13:09   ` Chen-Yu Tsai
2026-03-19 10:59 ` Wolfram Sang [this message]
2026-03-19 10:59 ` [PATCH v5 13/15] hwspinlock: sort include and update copyright Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 14/15] hwspinlock: refactor provider.h from public header Wolfram Sang
2026-03-19 13:10   ` Chen-Yu Tsai
2026-03-19 10:59 ` [PATCH v5 15/15] hwspinlock/treewide: refactor consumer.h " Wolfram Sang
2026-03-27 11:43 ` [PATCH v5 00/15] hwspinlock: move device alloc into core and refactor includes Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260319105947.6237-13-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=andersson@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®