Skip to content

Commit

Permalink
powerpc/papr_scm: use dev_get_drvdata
Browse files Browse the repository at this point in the history
Eliminate direct accesses to the driver_data field.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1653988790-19999-1-git-send-email-baihaowen@meizu.com
  • Loading branch information
Haowen Bai authored and Michael Ellerman committed Jun 29, 2022
1 parent 2a83afe commit d9abe36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/papr_scm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_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;

/* Allocate request buffer enough to hold single performance stat */
Expand Down

0 comments on commit d9abe36

Please sign in to comment.