Allocate the right power context objects in smu v14 and smu v15

Signed-off-by: Lijo Lazar <[email protected]>
---
 drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 4 ++--
 drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c
index 80dac277d1ae..f2e6105b0d79 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c
@@ -396,10 +396,10 @@ int smu_v14_0_init_power(struct smu_context *smu)
        if (smu_power->power_context || smu_power->power_context_size != 0)
                return -EINVAL;
 
-       smu_power->power_context = kzalloc_obj(struct smu_14_0_dpm_context);
+       smu_power->power_context = kzalloc_obj(struct smu_14_0_power_context);
        if (!smu_power->power_context)
                return -ENOMEM;
-       smu_power->power_context_size = sizeof(struct smu_14_0_dpm_context);
+       smu_power->power_context_size = sizeof(struct smu_14_0_power_context);
 
        return 0;
 }
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c
index 2269703869f9..dfc1022112d5 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c
@@ -338,10 +338,10 @@ int smu_v15_0_init_power(struct smu_context *smu)
        if (smu_power->power_context || smu_power->power_context_size != 0)
                return -EINVAL;
 
-       smu_power->power_context = kzalloc_obj(struct smu_15_0_dpm_context);
+       smu_power->power_context = kzalloc_obj(struct smu_15_0_power_context);
        if (!smu_power->power_context)
                return -ENOMEM;
-       smu_power->power_context_size = sizeof(struct smu_15_0_dpm_context);
+       smu_power->power_context_size = sizeof(struct smu_15_0_power_context);
 
        return 0;
 }
-- 
2.49.0

Reply via email to