gpu: nvgpu: vgpu: correct param to sysfs_attr_init

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 <sumitg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2034954
(cherry picked from commit daa4d7e42b)
Reviewed-on: https://git-master.nvidia.com/r/2132154
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Phoenix Jung <pjung@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
sumitg
2019-03-07 20:00:24 +05:30
committed by mobile promotions
parent fea9e05454
commit fadfa3289f

View File

@@ -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;