Skip to content

Commit

Permalink
ACPI: platform_profile: Move platform_profile_handler
Browse files Browse the repository at this point in the history
platform_profile_handler is now an internal structure. Move it to
platform_profile.c.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20250116002721.75592-17-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
  • Loading branch information
Kurt Borja authored and Ilpo Järvinen committed Jan 17, 2025
1 parent 07f531b commit 6ef3389
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
9 changes: 9 additions & 0 deletions drivers/acpi/platform_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 0 additions & 11 deletions include/linux/platform_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6ef3389

Please sign in to comment.