diff options
| author | Kurt Borja <kuurtb@gmail.com> | 2025-01-16 03:27:06 +0300 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-01-16 18:26:28 +0300 |
| commit | b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3 (patch) | |
| tree | 6b4b655c813729e556f91949d137224520ef4511 /drivers/platform/surface | |
| parent | cf3ea098dd3af415f079bc0b999055f213dd4a83 (diff) | |
| download | linux-b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3.tar.xz | |
ACPI: platform_profile: Add `ops` member to handlers
Replace *profile_get and *profile_set members with a general *ops
member.
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-5-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/surface')
| -rw-r--r-- | drivers/platform/surface/surface_platform_profile.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/platform/surface/surface_platform_profile.c b/drivers/platform/surface/surface_platform_profile.c index 26c1230e75df..76967bfeeef8 100644 --- a/drivers/platform/surface/surface_platform_profile.c +++ b/drivers/platform/surface/surface_platform_profile.c @@ -201,6 +201,11 @@ static int ssam_platform_profile_set(struct device *dev, return tp; } +static const struct platform_profile_ops ssam_platform_profile_ops = { + .profile_get = ssam_platform_profile_get, + .profile_set = ssam_platform_profile_set, +}; + static int surface_platform_profile_probe(struct ssam_device *sdev) { struct ssam_platform_profile_device *tpd; @@ -214,8 +219,7 @@ static int surface_platform_profile_probe(struct ssam_device *sdev) tpd->handler.name = "Surface Platform Profile"; tpd->handler.dev = &sdev->dev; - tpd->handler.profile_get = ssam_platform_profile_get; - tpd->handler.profile_set = ssam_platform_profile_set; + tpd->handler.ops = &ssam_platform_profile_ops; tpd->has_fan = device_property_read_bool(&sdev->dev, "has_fan"); |
