Home/Support/Support Forum/class_attr_driver_version error compiling in kernel 4.13
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

class_attr_driver_version error compiling in kernel 4.13

0 votes
src/dgrp-1.9/driver/build/dgrp_sysfs.c:71:35: error: expected ‘)’ before numeric constant
static CLASS_ATTR(driver_version, 0400, dgrp_class_version_show, NULL);
^~~~
src/dgrp-1.9/driver/build/dgrp_sysfs.c: In function ‘dgrp_create_class_sysfs_files’:
src/dgrp-1.9/driver/build/dgrp_sysfs.c:191:39: error: ‘class_attr_driver_version’ undeclared (first use in this function); did you mean ‘class_attribute_string’?
ret = class_create_file(dgrp_class, &class_attr_driver_version);
^~~~~~~~~~~~~~~~~~~~~~~~~
class_attribute_string
src/dgrp-1.9/driver/build/dgrp_sysfs.c:191:39: note: each undeclared identifier is reported only once for each function it appears in
src/dgrp-1.9/driver/build/dgrp_sysfs.c: In function ‘dgrp_remove_class_sysfs_files’:
src/dgrp-1.9/driver/build/dgrp_sysfs.c:223:33: error: ‘class_attr_driver_version’ undeclared (first use in this function); did you mean ‘class_attribute_string’?
class_remove_file(dgrp_class, &class_attr_driver_version);
^~~~~~~~~~~~~~~~~~~~~~~~~
class_attribute_string
At top level:
src/dgrp-1.9/driver/build/dgrp_sysfs.c:64:16: warning: ‘dgrp_class_version_show’ defined but not used [-Wunused-function]
static ssize_t dgrp_class_version_show(struct class *class, struct class_attribute *attr, char *buf)
^~~~~~~~~~~~~~~~~~~~~~~
asked Oct 2, 2017 in Realport by severach New to the Community (12 points)

Please log in or register to answer this question.

...