Commit d9abe36d authored by Haowen Bai's avatar Haowen Bai Committed by Michael Ellerman

powerpc/papr_scm: use dev_get_drvdata

Eliminate direct accesses to the driver_data field.
Signed-off-by: default avatarHaowen Bai <baihaowen@meizu.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1653988790-19999-1-git-send-email-baihaowen@meizu.com
parent 2a83afe7
...@@ -354,7 +354,7 @@ static int papr_scm_pmu_get_value(struct perf_event *event, struct device *dev, ...@@ -354,7 +354,7 @@ static int papr_scm_pmu_get_value(struct perf_event *event, struct device *dev,
{ {
struct papr_scm_perf_stat *stat; struct papr_scm_perf_stat *stat;
struct papr_scm_perf_stats *stats; struct papr_scm_perf_stats *stats;
struct papr_scm_priv *p = (struct papr_scm_priv *)dev->driver_data; struct papr_scm_priv *p = dev_get_drvdata(dev);
int rc, size; int rc, size;
/* Allocate request buffer enough to hold single performance stat */ /* Allocate request buffer enough to hold single performance stat */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment