.name = "boot",
};
+static BIN_ATTR(FBPT, 0400, sysfs_bin_attr_simple_read, NULL, 0);
+static BIN_ATTR(S3PT, 0400, sysfs_bin_attr_simple_read, NULL, 0);
+
static struct kobject *fpdt_kobj;
#if defined CONFIG_X86 && defined CONFIG_PHYS_ADDR_T_64BIT
break;
}
}
+
+ if (subtable_type == SUBTABLE_FBPT) {
+ bin_attr_FBPT.private = subtable_header;
+ bin_attr_FBPT.size = length;
+ result = sysfs_create_bin_file(fpdt_kobj, &bin_attr_FBPT);
+ if (result)
+ pr_warn("Failed to create FBPT sysfs attribute.\n");
+ } else if (subtable_type == SUBTABLE_S3PT) {
+ bin_attr_S3PT.private = subtable_header;
+ bin_attr_S3PT.size = length;
+ result = sysfs_create_bin_file(fpdt_kobj, &bin_attr_S3PT);
+ if (result)
+ pr_warn("Failed to create S3PT sysfs attribute.\n");
+ }
+
return 0;
err:
+ if (bin_attr_FBPT.private) {
+ sysfs_remove_bin_file(fpdt_kobj, &bin_attr_FBPT);
+ bin_attr_FBPT.private = NULL;
+ }
+
+ if (bin_attr_S3PT.private) {
+ sysfs_remove_bin_file(fpdt_kobj, &bin_attr_S3PT);
+ bin_attr_S3PT.private = NULL;
+ }
+
if (record_boot)
sysfs_remove_group(fpdt_kobj, &boot_attr_group);