Lines Matching refs:table_attr
345 struct acpi_table_attr *table_attr = in acpi_table_show() local
351 status = acpi_get_table(table_attr->name, table_attr->instance, in acpi_table_show()
363 struct acpi_table_attr *table_attr, in acpi_table_attr_init() argument
370 sysfs_attr_init(&table_attr->attr.attr); in acpi_table_attr_init()
371 ACPI_COPY_NAMESEG(table_attr->name, table_header->signature); in acpi_table_attr_init()
374 if (ACPI_COMPARE_NAMESEG(table_attr->name, attr->name)) in acpi_table_attr_init()
375 if (table_attr->instance < attr->instance) in acpi_table_attr_init()
376 table_attr->instance = attr->instance; in acpi_table_attr_init()
378 table_attr->instance++; in acpi_table_attr_init()
379 if (table_attr->instance > ACPI_MAX_TABLE_INSTANCES) { in acpi_table_attr_init()
381 table_attr->name); in acpi_table_attr_init()
385 ACPI_COPY_NAMESEG(table_attr->filename, table_header->signature); in acpi_table_attr_init()
386 table_attr->filename[ACPI_NAMESEG_SIZE] = '\0'; in acpi_table_attr_init()
387 if (table_attr->instance > 1 || (table_attr->instance == 1 && in acpi_table_attr_init()
391 table_attr->instance); in acpi_table_attr_init()
392 strcat(table_attr->filename, instance_str); in acpi_table_attr_init()
395 table_attr->attr.size = table_header->length; in acpi_table_attr_init()
396 table_attr->attr.read = acpi_table_show; in acpi_table_attr_init()
397 table_attr->attr.attr.name = table_attr->filename; in acpi_table_attr_init()
398 table_attr->attr.attr.mode = 0400; in acpi_table_attr_init()
400 return sysfs_create_bin_file(tables_obj, &table_attr->attr); in acpi_table_attr_init()
405 struct acpi_table_attr *table_attr; in acpi_sysfs_table_handler() local
409 table_attr = in acpi_sysfs_table_handler()
411 if (!table_attr) in acpi_sysfs_table_handler()
415 table_attr, table)) { in acpi_sysfs_table_handler()
416 kfree(table_attr); in acpi_sysfs_table_handler()
419 list_add_tail(&table_attr->node, &acpi_table_attr_list); in acpi_sysfs_table_handler()
502 struct acpi_table_attr *table_attr; in acpi_tables_sysfs_init() local
529 table_attr = kzalloc(sizeof(*table_attr), GFP_KERNEL); in acpi_tables_sysfs_init()
530 if (!table_attr) in acpi_tables_sysfs_init()
534 table_attr, table_header); in acpi_tables_sysfs_init()
536 kfree(table_attr); in acpi_tables_sysfs_init()
539 list_add_tail(&table_attr->node, &acpi_table_attr_list); in acpi_tables_sysfs_init()