Loading drivers/acpi/acpi_configfs.c +19 −19 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ static inline struct acpi_table_header *get_header(struct config_item *cfg) if (!table->header) pr_err("table not loaded\n"); return table->header; return table->header ?: ERR_PTR(-EINVAL); } static ssize_t acpi_table_aml_read(struct config_item *cfg, Loading @@ -78,8 +78,8 @@ static ssize_t acpi_table_aml_read(struct config_item *cfg, { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); if (data) memcpy(data, h, h->length); Loading @@ -100,8 +100,8 @@ static ssize_t acpi_table_signature_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%.*s\n", ACPI_NAMESEG_SIZE, h->signature); } Loading @@ -110,8 +110,8 @@ static ssize_t acpi_table_length_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%d\n", h->length); } Loading @@ -120,8 +120,8 @@ static ssize_t acpi_table_revision_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%d\n", h->revision); } Loading @@ -130,8 +130,8 @@ static ssize_t acpi_table_oem_id_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%.*s\n", ACPI_OEM_ID_SIZE, h->oem_id); } Loading @@ -140,8 +140,8 @@ static ssize_t acpi_table_oem_table_id_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%.*s\n", ACPI_OEM_TABLE_ID_SIZE, h->oem_table_id); } Loading @@ -150,8 +150,8 @@ static ssize_t acpi_table_oem_revision_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%d\n", h->oem_revision); } Loading @@ -161,8 +161,8 @@ static ssize_t acpi_table_asl_compiler_id_show(struct config_item *cfg, { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%.*s\n", ACPI_NAMESEG_SIZE, h->asl_compiler_id); } Loading @@ -172,8 +172,8 @@ static ssize_t acpi_table_asl_compiler_revision_show(struct config_item *cfg, { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%d\n", h->asl_compiler_revision); } Loading Loading
drivers/acpi/acpi_configfs.c +19 −19 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ static inline struct acpi_table_header *get_header(struct config_item *cfg) if (!table->header) pr_err("table not loaded\n"); return table->header; return table->header ?: ERR_PTR(-EINVAL); } static ssize_t acpi_table_aml_read(struct config_item *cfg, Loading @@ -78,8 +78,8 @@ static ssize_t acpi_table_aml_read(struct config_item *cfg, { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); if (data) memcpy(data, h, h->length); Loading @@ -100,8 +100,8 @@ static ssize_t acpi_table_signature_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%.*s\n", ACPI_NAMESEG_SIZE, h->signature); } Loading @@ -110,8 +110,8 @@ static ssize_t acpi_table_length_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%d\n", h->length); } Loading @@ -120,8 +120,8 @@ static ssize_t acpi_table_revision_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%d\n", h->revision); } Loading @@ -130,8 +130,8 @@ static ssize_t acpi_table_oem_id_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%.*s\n", ACPI_OEM_ID_SIZE, h->oem_id); } Loading @@ -140,8 +140,8 @@ static ssize_t acpi_table_oem_table_id_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%.*s\n", ACPI_OEM_TABLE_ID_SIZE, h->oem_table_id); } Loading @@ -150,8 +150,8 @@ static ssize_t acpi_table_oem_revision_show(struct config_item *cfg, char *str) { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%d\n", h->oem_revision); } Loading @@ -161,8 +161,8 @@ static ssize_t acpi_table_asl_compiler_id_show(struct config_item *cfg, { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%.*s\n", ACPI_NAMESEG_SIZE, h->asl_compiler_id); } Loading @@ -172,8 +172,8 @@ static ssize_t acpi_table_asl_compiler_revision_show(struct config_item *cfg, { struct acpi_table_header *h = get_header(cfg); if (!h) return -EINVAL; if (IS_ERR(h)) return PTR_ERR(h); return sysfs_emit(str, "%d\n", h->asl_compiler_revision); } Loading