drivers/acpi/acpi_lpat.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpi_lpat.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpi_lpat.c- Extension
.c- Size
- 4108 bytes
- Lines
- 152
- Domain
- Driver Families
- Bucket
- drivers/acpi
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hlinux/acpi.hacpi/acpi_lpat.h
Detected Declarations
function Copyrightfunction acpi_lpat_temp_to_rawfunction acpi_lpat_get_conversion_tablefunction acpi_lpat_free_conversion_tableexport acpi_lpat_raw_to_tempexport acpi_lpat_temp_to_rawexport acpi_lpat_get_conversion_tableexport acpi_lpat_free_conversion_table
Annotated Snippet
if (obj_e->type != ACPI_TYPE_INTEGER) {
kfree(lpat);
goto out;
}
lpat[i] = (s64)obj_e->integer.value;
}
lpat_table = kzalloc_obj(*lpat_table);
if (!lpat_table) {
kfree(lpat);
goto out;
}
lpat_table->lpat = (struct acpi_lpat *)lpat;
lpat_table->lpat_count = obj_p->package.count / 2;
out:
kfree(buffer.pointer);
return lpat_table;
}
EXPORT_SYMBOL_GPL(acpi_lpat_get_conversion_table);
/**
* acpi_lpat_free_conversion_table(): Free LPAT table.
*
* @lpat_table: the temperature_raw mapping table structure
*
* Frees the LPAT table previously allocated by a call to
* acpi_lpat_get_conversion_table.
*/
void acpi_lpat_free_conversion_table(struct acpi_lpat_conversion_table
*lpat_table)
{
if (lpat_table) {
kfree(lpat_table->lpat);
kfree(lpat_table);
}
}
EXPORT_SYMBOL_GPL(acpi_lpat_free_conversion_table);
Annotation
- Immediate include surface: `linux/export.h`, `linux/acpi.h`, `acpi/acpi_lpat.h`.
- Detected declarations: `function Copyright`, `function acpi_lpat_temp_to_raw`, `function acpi_lpat_get_conversion_table`, `function acpi_lpat_free_conversion_table`, `export acpi_lpat_raw_to_temp`, `export acpi_lpat_temp_to_raw`, `export acpi_lpat_get_conversion_table`, `export acpi_lpat_free_conversion_table`.
- Atlas domain: Driver Families / drivers/acpi.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.