}
 
 static ssize_t data_read(struct file *filep, struct kobject *kobj,
-                        struct bin_attribute *attr, char *buf, loff_t off,
+                        const struct bin_attribute *attr, char *buf, loff_t off,
                         size_t count)
 {
        char *data;
 }
 
 static ssize_t update_write(struct file *filep, struct kobject *kobj,
-                           struct bin_attribute *attr, char *buf, loff_t off,
+                           const struct bin_attribute *attr, char *buf, loff_t off,
                            size_t count)
 {
        int rc;
 
 static struct kobj_attribute size_attr = __ATTR_RO(size);
 
-static struct bin_attribute data_attr = __BIN_ATTR_RO(data, 0);
+static struct bin_attribute data_attr __ro_after_init = __BIN_ATTR_RO(data, 0);
 
-static struct bin_attribute update_attr = __BIN_ATTR_WO(update, 0);
+static struct bin_attribute update_attr __ro_after_init = __BIN_ATTR_WO(update, 0);
 
-static struct bin_attribute *secvar_bin_attrs[] = {
+static const struct bin_attribute *const secvar_bin_attrs[] = {
        &data_attr,
        &update_attr,
        NULL,
 
 static const struct attribute_group secvar_attr_group = {
        .attrs = secvar_attrs,
-       .bin_attrs = secvar_bin_attrs,
+       .bin_attrs_new = secvar_bin_attrs,
 };
 __ATTRIBUTE_GROUPS(secvar_attr);