diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2021-01-25 12:59:57 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-01-27 18:45:29 +0100 |
commit | 84f9017c37c479c4f70456a645d24d2296ad2208 (patch) | |
tree | b55c7dcf406ce8513023c90ad1a5f32e44998234 /drivers/acpi/platform_profile.c | |
parent | 9d56653d14cd5e545599cd9e3013daa17df50cd4 (diff) | |
download | linux-84f9017c37c479c4f70456a645d24d2296ad2208.tar.bz2 |
ACPI: platform-profile: Introduce object pointers to callbacks
Add an object pointer to handler callbacks to avoid the need for
drivers to have a global variable to get to their driver-data
struct.
Link: https://lore.kernel.org/linux-acpi/6a29f338-d9e4-150c-81dd-2ffb54f5bc35@redhat.com/
Link: https://lore.kernel.org/r/20210114073429.176462-3-jiaxun.yang@flygoat.com
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/platform_profile.c')
-rw-r--r-- | drivers/acpi/platform_profile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c index f65c61db7921..80e9df427eb8 100644 --- a/drivers/acpi/platform_profile.c +++ b/drivers/acpi/platform_profile.c @@ -64,7 +64,7 @@ static ssize_t platform_profile_show(struct device *dev, return -ENODEV; } - err = cur_profile->profile_get(&profile); + err = cur_profile->profile_get(cur_profile, &profile); mutex_unlock(&profile_lock); if (err) return err; @@ -104,7 +104,7 @@ static ssize_t platform_profile_store(struct device *dev, return -EOPNOTSUPP; } - err = cur_profile->profile_set(i); + err = cur_profile->profile_set(cur_profile, i); mutex_unlock(&profile_lock); if (err) return err; |