From fadfa3289fdd6a0f9805fd97fd608f4b0254463f Mon Sep 17 00:00:00 2001 From: sumitg Date: Thu, 7 Mar 2019 20:00:24 +0530 Subject: gpu: nvgpu: vgpu: correct param to sysfs_attr_init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass correct attr parameter to sysfs_attr_init(). This fixes the compilation error on enabling debug lock alloc. error: ‘struct device_attribute’ has no member named ‘key’ Bug 200464909 Bug 2604007 Change-Id: Ia0d2672b1c8fe9eb4807b4809892dcdc0cff2669 Signed-off-by: sumitg Reviewed-on: https://git-master.nvidia.com/r/2034954 (cherry picked from commit daa4d7e42b3dcb0dc590b1b3c3356259ee0423d6) Reviewed-on: https://git-master.nvidia.com/r/2132154 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Phoenix Jung Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/vgpu/sysfs_vgpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu') diff --git a/drivers/gpu/nvgpu/os/linux/vgpu/sysfs_vgpu.c b/drivers/gpu/nvgpu/os/linux/vgpu/sysfs_vgpu.c index 30ca7f53..ade5d82a 100644 --- a/drivers/gpu/nvgpu/os/linux/vgpu/sysfs_vgpu.c +++ b/drivers/gpu/nvgpu/os/linux/vgpu/sysfs_vgpu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -92,7 +92,7 @@ static int vgpu_create_ecc_sysfs(struct device *dev) } for (i = 0; i < count; i++) { - sysfs_attr_init(&attrs[i].attr); + sysfs_attr_init(&attrs[i].attr.attr); attrs[i].attr.attr.name = stats[i].name; attrs[i].attr.attr.mode = VERIFY_OCTAL_PERMISSIONS(S_IRUGO); attrs[i].attr.show = vgpu_ecc_stat_show; -- cgit v1.2.2