.. | .. |
---|
83 | 83 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T490s"), |
---|
84 | 84 | }, |
---|
85 | 85 | }, |
---|
| 86 | + { |
---|
| 87 | + .callback = tpm_tis_disable_irq, |
---|
| 88 | + .ident = "ThinkStation P360 Tiny", |
---|
| 89 | + .matches = { |
---|
| 90 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
---|
| 91 | + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkStation P360 Tiny"), |
---|
| 92 | + }, |
---|
| 93 | + }, |
---|
| 94 | + { |
---|
| 95 | + .callback = tpm_tis_disable_irq, |
---|
| 96 | + .ident = "ThinkPad L490", |
---|
| 97 | + .matches = { |
---|
| 98 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
---|
| 99 | + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L490"), |
---|
| 100 | + }, |
---|
| 101 | + }, |
---|
86 | 102 | {} |
---|
87 | 103 | }; |
---|
88 | 104 | |
---|
.. | .. |
---|
125 | 141 | const struct acpi_device_id *aid = acpi_match_device(tpm_acpi_tbl, dev); |
---|
126 | 142 | struct acpi_table_tpm2 *tbl; |
---|
127 | 143 | acpi_status st; |
---|
| 144 | + int ret = 0; |
---|
128 | 145 | |
---|
129 | 146 | if (!aid || aid->driver_data != DEVICE_IS_TPM2) |
---|
130 | 147 | return 0; |
---|
.. | .. |
---|
132 | 149 | /* If the ACPI TPM2 signature is matched then a global ACPI_SIG_TPM2 |
---|
133 | 150 | * table is mandatory |
---|
134 | 151 | */ |
---|
135 | | - st = |
---|
136 | | - acpi_get_table(ACPI_SIG_TPM2, 1, (struct acpi_table_header **)&tbl); |
---|
| 152 | + st = acpi_get_table(ACPI_SIG_TPM2, 1, (struct acpi_table_header **)&tbl); |
---|
137 | 153 | if (ACPI_FAILURE(st) || tbl->header.length < sizeof(*tbl)) { |
---|
138 | 154 | dev_err(dev, FW_BUG "failed to get TPM2 ACPI table\n"); |
---|
139 | 155 | return -EINVAL; |
---|
.. | .. |
---|
141 | 157 | |
---|
142 | 158 | /* The tpm2_crb driver handles this device */ |
---|
143 | 159 | if (tbl->start_method != ACPI_TPM2_MEMORY_MAPPED) |
---|
144 | | - return -ENODEV; |
---|
| 160 | + ret = -ENODEV; |
---|
145 | 161 | |
---|
146 | | - return 0; |
---|
| 162 | + acpi_put_table((struct acpi_table_header *)tbl); |
---|
| 163 | + return ret; |
---|
147 | 164 | } |
---|
148 | 165 | #else |
---|
149 | 166 | static int check_acpi_tpm2(struct device *dev) |
---|