diff options
| -rw-r--r-- | Documentation/acpi/aml-debugger.txt | 4 | ||||
| -rw-r--r-- | drivers/acpi/acpi_configfs.c | 25 | ||||
| -rw-r--r-- | drivers/acpi/device_sysfs.c | 6 | ||||
| -rw-r--r-- | drivers/acpi/pptt.c | 3 |
4 files changed, 23 insertions, 15 deletions
diff --git a/Documentation/acpi/aml-debugger.txt b/Documentation/acpi/aml-debugger.txt index e851cc5de63f..75ebeb64ab29 100644 --- a/Documentation/acpi/aml-debugger.txt +++ b/Documentation/acpi/aml-debugger.txt | |||
| @@ -23,7 +23,7 @@ kernel. | |||
| 23 | 23 | ||
| 24 | The resultant userspace tool binary is then located at: | 24 | The resultant userspace tool binary is then located at: |
| 25 | 25 | ||
| 26 | tools/acpi/power/acpi/acpidbg/acpidbg | 26 | tools/power/acpi/acpidbg |
| 27 | 27 | ||
| 28 | It can be installed to system directories by running "make install" (as a | 28 | It can be installed to system directories by running "make install" (as a |
| 29 | sufficiently privileged user). | 29 | sufficiently privileged user). |
| @@ -35,7 +35,7 @@ kernel. | |||
| 35 | 35 | ||
| 36 | # mount -t debugfs none /sys/kernel/debug | 36 | # mount -t debugfs none /sys/kernel/debug |
| 37 | # modprobe acpi_dbg | 37 | # modprobe acpi_dbg |
| 38 | # tools/acpi/power/acpi/acpidbg/acpidbg | 38 | # tools/power/acpi/acpidbg |
| 39 | 39 | ||
| 40 | That spawns the interactive AML debugger environment where you can execute | 40 | That spawns the interactive AML debugger environment where you can execute |
| 41 | debugger commands. | 41 | debugger commands. |
diff --git a/drivers/acpi/acpi_configfs.c b/drivers/acpi/acpi_configfs.c index b58850389094..81bfc6197293 100644 --- a/drivers/acpi/acpi_configfs.c +++ b/drivers/acpi/acpi_configfs.c | |||
| @@ -97,12 +97,12 @@ static ssize_t acpi_table_aml_read(struct config_item *cfg, | |||
| 97 | 97 | ||
| 98 | CONFIGFS_BIN_ATTR(acpi_table_, aml, NULL, MAX_ACPI_TABLE_SIZE); | 98 | CONFIGFS_BIN_ATTR(acpi_table_, aml, NULL, MAX_ACPI_TABLE_SIZE); |
| 99 | 99 | ||
| 100 | struct configfs_bin_attribute *acpi_table_bin_attrs[] = { | 100 | static struct configfs_bin_attribute *acpi_table_bin_attrs[] = { |
| 101 | &acpi_table_attr_aml, | 101 | &acpi_table_attr_aml, |
| 102 | NULL, | 102 | NULL, |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| 105 | ssize_t acpi_table_signature_show(struct config_item *cfg, char *str) | 105 | static ssize_t acpi_table_signature_show(struct config_item *cfg, char *str) |
| 106 | { | 106 | { |
| 107 | struct acpi_table_header *h = get_header(cfg); | 107 | struct acpi_table_header *h = get_header(cfg); |
| 108 | 108 | ||
| @@ -112,7 +112,7 @@ ssize_t acpi_table_signature_show(struct config_item *cfg, char *str) | |||
| 112 | return sprintf(str, "%.*s\n", ACPI_NAME_SIZE, h->signature); | 112 | return sprintf(str, "%.*s\n", ACPI_NAME_SIZE, h->signature); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | ssize_t acpi_table_length_show(struct config_item *cfg, char *str) | 115 | static ssize_t acpi_table_length_show(struct config_item *cfg, char *str) |
| 116 | { | 116 | { |
| 117 | struct acpi_table_header *h = get_header(cfg); | 117 | struct acpi_table_header *h = get_header(cfg); |
| 118 | 118 | ||
| @@ -122,7 +122,7 @@ ssize_t acpi_table_length_show(struct config_item *cfg, char *str) | |||
| 122 | return sprintf(str, "%d\n", h->length); | 122 | return sprintf(str, "%d\n", h->length); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | ssize_t acpi_table_revision_show(struct config_item *cfg, char *str) | 125 | static ssize_t acpi_table_revision_show(struct config_item *cfg, char *str) |
| 126 | { | 126 | { |
| 127 | struct acpi_table_header *h = get_header(cfg); | 127 | struct acpi_table_header *h = get_header(cfg); |
| 128 | 128 | ||
| @@ -132,7 +132,7 @@ ssize_t acpi_table_revision_show(struct config_item *cfg, char *str) | |||
| 132 | return sprintf(str, "%d\n", h->revision); | 132 | return sprintf(str, "%d\n", h->revision); |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | ssize_t acpi_table_oem_id_show(struct config_item *cfg, char *str) | 135 | static ssize_t acpi_table_oem_id_show(struct config_item *cfg, char *str) |
| 136 | { | 136 | { |
| 137 | struct acpi_table_header *h = get_header(cfg); | 137 | struct acpi_table_header *h = get_header(cfg); |
| 138 | 138 | ||
| @@ -142,7 +142,7 @@ ssize_t acpi_table_oem_id_show(struct config_item *cfg, char *str) | |||
| 142 | return sprintf(str, "%.*s\n", ACPI_OEM_ID_SIZE, h->oem_id); | 142 | return sprintf(str, "%.*s\n", ACPI_OEM_ID_SIZE, h->oem_id); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | ssize_t acpi_table_oem_table_id_show(struct config_item *cfg, char *str) | 145 | static ssize_t acpi_table_oem_table_id_show(struct config_item *cfg, char *str) |
| 146 | { | 146 | { |
| 147 | struct acpi_table_header *h = get_header(cfg); | 147 | struct acpi_table_header *h = get_header(cfg); |
| 148 | 148 | ||
| @@ -152,7 +152,7 @@ ssize_t acpi_table_oem_table_id_show(struct config_item *cfg, char *str) | |||
| 152 | return sprintf(str, "%.*s\n", ACPI_OEM_TABLE_ID_SIZE, h->oem_table_id); | 152 | return sprintf(str, "%.*s\n", ACPI_OEM_TABLE_ID_SIZE, h->oem_table_id); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | ssize_t acpi_table_oem_revision_show(struct config_item *cfg, char *str) | 155 | static ssize_t acpi_table_oem_revision_show(struct config_item *cfg, char *str) |
| 156 | { | 156 | { |
| 157 | struct acpi_table_header *h = get_header(cfg); | 157 | struct acpi_table_header *h = get_header(cfg); |
| 158 | 158 | ||
| @@ -162,7 +162,8 @@ ssize_t acpi_table_oem_revision_show(struct config_item *cfg, char *str) | |||
| 162 | return sprintf(str, "%d\n", h->oem_revision); | 162 | return sprintf(str, "%d\n", h->oem_revision); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | ssize_t acpi_table_asl_compiler_id_show(struct config_item *cfg, char *str) | 165 | static ssize_t acpi_table_asl_compiler_id_show(struct config_item *cfg, |
| 166 | char *str) | ||
| 166 | { | 167 | { |
| 167 | struct acpi_table_header *h = get_header(cfg); | 168 | struct acpi_table_header *h = get_header(cfg); |
| 168 | 169 | ||
| @@ -172,8 +173,8 @@ ssize_t acpi_table_asl_compiler_id_show(struct config_item *cfg, char *str) | |||
| 172 | return sprintf(str, "%.*s\n", ACPI_NAME_SIZE, h->asl_compiler_id); | 173 | return sprintf(str, "%.*s\n", ACPI_NAME_SIZE, h->asl_compiler_id); |
| 173 | } | 174 | } |
| 174 | 175 | ||
| 175 | ssize_t acpi_table_asl_compiler_revision_show(struct config_item *cfg, | 176 | static ssize_t acpi_table_asl_compiler_revision_show(struct config_item *cfg, |
| 176 | char *str) | 177 | char *str) |
| 177 | { | 178 | { |
| 178 | struct acpi_table_header *h = get_header(cfg); | 179 | struct acpi_table_header *h = get_header(cfg); |
| 179 | 180 | ||
| @@ -192,7 +193,7 @@ CONFIGFS_ATTR_RO(acpi_table_, oem_revision); | |||
| 192 | CONFIGFS_ATTR_RO(acpi_table_, asl_compiler_id); | 193 | CONFIGFS_ATTR_RO(acpi_table_, asl_compiler_id); |
| 193 | CONFIGFS_ATTR_RO(acpi_table_, asl_compiler_revision); | 194 | CONFIGFS_ATTR_RO(acpi_table_, asl_compiler_revision); |
| 194 | 195 | ||
| 195 | struct configfs_attribute *acpi_table_attrs[] = { | 196 | static struct configfs_attribute *acpi_table_attrs[] = { |
| 196 | &acpi_table_attr_signature, | 197 | &acpi_table_attr_signature, |
| 197 | &acpi_table_attr_length, | 198 | &acpi_table_attr_length, |
| 198 | &acpi_table_attr_revision, | 199 | &acpi_table_attr_revision, |
| @@ -232,7 +233,7 @@ static void acpi_table_drop_item(struct config_group *group, | |||
| 232 | acpi_tb_unload_table(table->index); | 233 | acpi_tb_unload_table(table->index); |
| 233 | } | 234 | } |
| 234 | 235 | ||
| 235 | struct configfs_group_operations acpi_table_group_ops = { | 236 | static struct configfs_group_operations acpi_table_group_ops = { |
| 236 | .make_item = acpi_table_make_item, | 237 | .make_item = acpi_table_make_item, |
| 237 | .drop_item = acpi_table_drop_item, | 238 | .drop_item = acpi_table_drop_item, |
| 238 | }; | 239 | }; |
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 545e91420cde..8940054d6250 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c | |||
| @@ -202,11 +202,15 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias, | |||
| 202 | { | 202 | { |
| 203 | struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER }; | 203 | struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER }; |
| 204 | const union acpi_object *of_compatible, *obj; | 204 | const union acpi_object *of_compatible, *obj; |
| 205 | acpi_status status; | ||
| 205 | int len, count; | 206 | int len, count; |
| 206 | int i, nval; | 207 | int i, nval; |
| 207 | char *c; | 208 | char *c; |
| 208 | 209 | ||
| 209 | acpi_get_name(acpi_dev->handle, ACPI_SINGLE_NAME, &buf); | 210 | status = acpi_get_name(acpi_dev->handle, ACPI_SINGLE_NAME, &buf); |
| 211 | if (ACPI_FAILURE(status)) | ||
| 212 | return -ENODEV; | ||
| 213 | |||
| 210 | /* DT strings are all in lower case */ | 214 | /* DT strings are all in lower case */ |
| 211 | for (c = buf.pointer; *c != '\0'; c++) | 215 | for (c = buf.pointer; *c != '\0'; c++) |
| 212 | *c = tolower(*c); | 216 | *c = tolower(*c); |
diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c index ad31c50de3be..065c4fc245d1 100644 --- a/drivers/acpi/pptt.c +++ b/drivers/acpi/pptt.c | |||
| @@ -209,6 +209,9 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr, | |||
| 209 | struct acpi_pptt_processor *cpu_node; | 209 | struct acpi_pptt_processor *cpu_node; |
| 210 | u32 proc_sz; | 210 | u32 proc_sz; |
| 211 | 211 | ||
| 212 | if (table_hdr->revision > 1) | ||
| 213 | return (node->flags & ACPI_PPTT_ACPI_LEAF_NODE); | ||
| 214 | |||
| 212 | table_end = (unsigned long)table_hdr + table_hdr->length; | 215 | table_end = (unsigned long)table_hdr + table_hdr->length; |
| 213 | node_entry = ACPI_PTR_DIFF(node, table_hdr); | 216 | node_entry = ACPI_PTR_DIFF(node, table_hdr); |
| 214 | entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr, | 217 | entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr, |
