aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/surface/surface_platform_profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/surface/surface_platform_profile.c')
-rw-r--r--drivers/platform/surface/surface_platform_profile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/surface/surface_platform_profile.c b/drivers/platform/surface/surface_platform_profile.c
index 6c87e982bfc8..edb9362003a4 100644
--- a/drivers/platform/surface/surface_platform_profile.c
+++ b/drivers/platform/surface/surface_platform_profile.c
@@ -161,7 +161,7 @@ static int ssam_platform_profile_get(struct platform_profile_handler *pprof,
enum ssam_tmp_profile tp;
int status;
- tpd = container_of(pprof, struct ssam_platform_profile_device, handler);
+ tpd = dev_get_drvdata(&pprof->class_dev);
status = ssam_tmp_profile_get(tpd->sdev, &tp);
if (status)
@@ -181,7 +181,7 @@ static int ssam_platform_profile_set(struct platform_profile_handler *pprof,
struct ssam_platform_profile_device *tpd;
int tp;
- tpd = container_of(pprof, struct ssam_platform_profile_device, handler);
+ tpd = dev_get_drvdata(&pprof->class_dev);
tp = convert_profile_to_ssam_tmp(tpd->sdev, profile);
if (tp < 0)
@@ -224,7 +224,7 @@ static int surface_platform_profile_probe(struct ssam_device *sdev)
set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, tpd->handler.choices);
set_bit(PLATFORM_PROFILE_PERFORMANCE, tpd->handler.choices);
- return platform_profile_register(&tpd->handler);
+ return platform_profile_register(&tpd->handler, tpd);
}
static void surface_platform_profile_remove(struct ssam_device *sdev)