From 50ba382b87010e8194ce97e067c2ee2049e891c3 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Fri, 10 Jun 2022 01:17:27 +0000 Subject: drm/i915: Fix CFI violation with show_dynamic_id() From Nathan Chancellor d50d1c703bbd8930d11e5bc01e2cc3c8dcda8f4b in linux 5.15.y/5.15.46 58606220a2f1407a7516c547f09a1ba7b4350a73 in mainline linux --- sys/dev/pci/drm/i915/i915_perf.c | 4 ++-- sys/dev/pci/drm/i915/i915_perf_types.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/dev/pci/drm/i915/i915_perf.c b/sys/dev/pci/drm/i915/i915_perf.c index 101151a8afb..eb46656070d 100644 --- a/sys/dev/pci/drm/i915/i915_perf.c +++ b/sys/dev/pci/drm/i915/i915_perf.c @@ -4049,8 +4049,8 @@ addr_err: return ERR_PTR(err); } -static ssize_t show_dynamic_id(struct device *dev, - struct device_attribute *attr, +static ssize_t show_dynamic_id(struct kobject *kobj, + struct kobj_attribute *attr, char *buf) { struct i915_oa_config *oa_config = diff --git a/sys/dev/pci/drm/i915/i915_perf_types.h b/sys/dev/pci/drm/i915/i915_perf_types.h index 92d1a1ded8d..98b317850e5 100644 --- a/sys/dev/pci/drm/i915/i915_perf_types.h +++ b/sys/dev/pci/drm/i915/i915_perf_types.h @@ -55,7 +55,7 @@ struct i915_oa_config { struct attribute_group sysfs_metric; struct attribute *attrs[2]; - struct device_attribute sysfs_metric_id; + struct kobj_attribute sysfs_metric_id; struct kref ref; struct rcu_head rcu; -- cgit v1.2.3