0
我所做的:
static const struct attribute const *attrs1= {
&foo_attribute.attr,
NULL,
};
static const struct attribute_group const attr_group = {
.attrs = attrs1,
};
但得到這些錯誤:
error: initializer element is not constant
error: (near initialization for 'attr_group.attrs')
發現this解決方案,但不知道如何解決它...
編輯: 該行觸發錯誤:
.attrs = attrs1,
哪行觸發錯誤? – elyashiv