diff mbox series

[16/18] ACPI: platform_profile: Move platform_profile_handler

Message ID 20250109150731.110799-17-kuurtb@gmail.com (mailing list archive)
State Changes Requested, archived
Headers show
Series Hide platform_profile_handler from consumers | expand

Commit Message

Kurt Borja Jan. 9, 2025, 3:06 p.m. UTC
platform_profile_handler is now an internal structure. Move it to
platform_profile.c.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
 drivers/acpi/platform_profile.c  |  9 +++++++++
 include/linux/platform_profile.h | 11 -----------
 2 files changed, 9 insertions(+), 11 deletions(-)

Comments

Mario Limonciello Jan. 9, 2025, 4:40 p.m. UTC | #1
On 1/9/2025 09:06, Kurt Borja wrote:
> platform_profile_handler is now an internal structure. Move it to
> platform_profile.c.
> 
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Reviewed-by: Mario Limonceillo <mario.limonciello@amd.com>
> ---
>   drivers/acpi/platform_profile.c  |  9 +++++++++
>   include/linux/platform_profile.h | 11 -----------
>   2 files changed, 9 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
> index 8d034d928e32..c7a867bd01df 100644
> --- a/drivers/acpi/platform_profile.c
> +++ b/drivers/acpi/platform_profile.c
> @@ -15,6 +15,15 @@
>   
>   static DEFINE_MUTEX(profile_lock);
>   
> +struct platform_profile_handler {
> +	const char *name;
> +	struct device *dev;
> +	struct device class_dev;
> +	int minor;
> +	unsigned long choices[BITS_TO_LONGS(PLATFORM_PROFILE_LAST)];
> +	const struct platform_profile_ops *ops;
> +};
> +
>   static const char * const profile_names[] = {
>   	[PLATFORM_PROFILE_LOW_POWER] = "low-power",
>   	[PLATFORM_PROFILE_COOL] = "cool",
> diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
> index 0824a12b9998..2c99aff7cd19 100644
> --- a/include/linux/platform_profile.h
> +++ b/include/linux/platform_profile.h
> @@ -28,23 +28,12 @@ enum platform_profile_option {
>   	PLATFORM_PROFILE_LAST, /*must always be last */
>   };
>   
> -struct platform_profile_handler;
> -
>   struct platform_profile_ops {
>   	int (*profile_get)(struct device *dev, enum platform_profile_option *profile);
>   	int (*profile_set)(struct device *dev, enum platform_profile_option profile);
>   	int (*choices)(void *drvdata, unsigned long *choices);
>   };
>   
> -struct platform_profile_handler {
> -	const char *name;
> -	struct device *dev;
> -	struct device class_dev;
> -	int minor;
> -	unsigned long choices[BITS_TO_LONGS(PLATFORM_PROFILE_LAST)];
> -	const struct platform_profile_ops *ops;
> -};
> -
>   struct device *platform_profile_register(struct device *dev, const char *name,
>   					 void *drvdata,
>   					 const struct platform_profile_ops *ops);
diff mbox series

Patch

diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
index 8d034d928e32..c7a867bd01df 100644
--- a/drivers/acpi/platform_profile.c
+++ b/drivers/acpi/platform_profile.c
@@ -15,6 +15,15 @@ 
 
 static DEFINE_MUTEX(profile_lock);
 
+struct platform_profile_handler {
+	const char *name;
+	struct device *dev;
+	struct device class_dev;
+	int minor;
+	unsigned long choices[BITS_TO_LONGS(PLATFORM_PROFILE_LAST)];
+	const struct platform_profile_ops *ops;
+};
+
 static const char * const profile_names[] = {
 	[PLATFORM_PROFILE_LOW_POWER] = "low-power",
 	[PLATFORM_PROFILE_COOL] = "cool",
diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
index 0824a12b9998..2c99aff7cd19 100644
--- a/include/linux/platform_profile.h
+++ b/include/linux/platform_profile.h
@@ -28,23 +28,12 @@  enum platform_profile_option {
 	PLATFORM_PROFILE_LAST, /*must always be last */
 };
 
-struct platform_profile_handler;
-
 struct platform_profile_ops {
 	int (*profile_get)(struct device *dev, enum platform_profile_option *profile);
 	int (*profile_set)(struct device *dev, enum platform_profile_option profile);
 	int (*choices)(void *drvdata, unsigned long *choices);
 };
 
-struct platform_profile_handler {
-	const char *name;
-	struct device *dev;
-	struct device class_dev;
-	int minor;
-	unsigned long choices[BITS_TO_LONGS(PLATFORM_PROFILE_LAST)];
-	const struct platform_profile_ops *ops;
-};
-
 struct device *platform_profile_register(struct device *dev, const char *name,
 					 void *drvdata,
 					 const struct platform_profile_ops *ops);