From fde90d0c8dc9182bfa730e889ffc26cefca18ccc Mon Sep 17 00:00:00 2001 From: Vince Hsu Date: Thu, 26 Jul 2018 19:16:59 +0800 Subject: gpu: nvgpu: pass correct argument to sysfs_attr_init The sysfs_attr_init accepts pointer of struct attribute instead of struct device_attribute. This patch fixes build error when CONFIG_DEBUG_LOCK_ALLOC is enabled. Bug 200432223 Change-Id: Id655ca18102c5252485db378ba2499a66d758882 Signed-off-by: Vince Hsu Reviewed-on: https://git-master.nvidia.com/r/1786590 Reviewed-by: Deepak Nibade Reviewed-by: Alex Waterman Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ecc_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/os') diff --git a/drivers/gpu/nvgpu/os/linux/ecc_sysfs.c b/drivers/gpu/nvgpu/os/linux/ecc_sysfs.c index 0962e247..d2986d7d 100644 --- a/drivers/gpu/nvgpu/os/linux/ecc_sysfs.c +++ b/drivers/gpu/nvgpu/os/linux/ecc_sysfs.c @@ -40,7 +40,7 @@ int nvgpu_ecc_sysfs_init(struct gk20a *g) ecc->stats_count); break; } - sysfs_attr_init(&attr[i].attr); + sysfs_attr_init(&attr[i].attr.attr); attr[i].attr.attr.name = stat->name; attr[i].attr.attr.mode = VERIFY_OCTAL_PERMISSIONS(S_IRUGO); attr[i].var = &stat->counter; -- cgit v1.2.2