[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250420-fix_power-v1-1-1454cf1dc534@quicinc.com>
Date: Sun, 20 Apr 2025 11:17:50 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Pavel Machek <pavel@...nel.org>, Len Brown <len.brown@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Danilo Krummrich <dakr@...nel.org>
Cc: Zijun Hu <zijun_hu@...oud.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH] PM: wakeup: Do not expose wakeup_source_create()
From: Zijun Hu <quic_zijuhu@...cinc.com>
wakeup_source_create() is only used by drivers/base/power/wakeup.c
internally.
Do not expose it by making it as static function as its counterpart
wakeup_source_free() does.
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
drivers/base/power/wakeup.c | 3 +--
include/linux/pm_wakeup.h | 6 ------
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index 63bf914a4d4467dcf6c42e50951b91677fb9c46d..bb311c02f5a4754beb1c3d97e61f36d50d474e23 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -77,7 +77,7 @@ static DEFINE_IDA(wakeup_ida);
* wakeup_source_create - Create a struct wakeup_source object.
* @name: Name of the new wakeup source.
*/
-struct wakeup_source *wakeup_source_create(const char *name)
+static struct wakeup_source *wakeup_source_create(const char *name)
{
struct wakeup_source *ws;
const char *ws_name;
@@ -106,7 +106,6 @@ struct wakeup_source *wakeup_source_create(const char *name)
err_ws:
return NULL;
}
-EXPORT_SYMBOL_GPL(wakeup_source_create);
/*
* Record wakeup_source statistics being deleted into a dummy wakeup_source.
diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h
index 51e0e8dd5f9e50d928db6efa2e3232a117d7e012..6689e73a3a2d249a6eb3517b0597e737b01248bb 100644
--- a/include/linux/pm_wakeup.h
+++ b/include/linux/pm_wakeup.h
@@ -95,7 +95,6 @@ static inline void device_set_wakeup_path(struct device *dev)
}
/* drivers/base/power/wakeup.c */
-extern struct wakeup_source *wakeup_source_create(const char *name);
extern void wakeup_source_destroy(struct wakeup_source *ws);
extern void wakeup_source_add(struct wakeup_source *ws);
extern void wakeup_source_remove(struct wakeup_source *ws);
@@ -129,11 +128,6 @@ static inline bool device_can_wakeup(struct device *dev)
return dev->power.can_wakeup;
}
-static inline struct wakeup_source *wakeup_source_create(const char *name)
-{
- return NULL;
-}
-
static inline void wakeup_source_destroy(struct wakeup_source *ws) {}
static inline void wakeup_source_add(struct wakeup_source *ws) {}
---
base-commit: 8117b017f3826b18a426f22de1e001767bc50fd3
change-id: 20250420-fix_power-d50763e4c821
Best regards,
--
Zijun Hu <quic_zijuhu@...cinc.com>
Powered by blists - more mailing lists