Commit 6ef33895 authored by Kurt Borja's avatar Kurt Borja Committed by Ilpo Järvinen
Browse files

ACPI: platform_profile: Move platform_profile_handler



platform_profile_handler is now an internal structure. Move it to
platform_profile.c.

Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarKurt Borja <kuurtb@gmail.com>
Reviewed-by: default avatarMark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: default avatarMark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20250116002721.75592-17-kuurtb@gmail.com


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 07f531b3
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -14,6 +14,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",
+0 −11
Original line number Diff line number Diff line
@@ -28,23 +28,12 @@ enum platform_profile_option {
	PLATFORM_PROFILE_LAST, /*must always be last */
};

struct platform_profile_handler;

struct platform_profile_ops {
	int (*probe)(void *drvdata, unsigned long *choices);
	int (*profile_get)(struct device *dev, enum platform_profile_option *profile);
	int (*profile_set)(struct device *dev, enum platform_profile_option profile);
};

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);