drivers/acpi/acpica/nsxfname.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/nsxfname.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/nsxfname.c- Extension
.c- Size
- 16557 bytes
- Lines
- 612
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
acpi/acpi.haccommon.hacnamesp.hacparser.hamlcode.h
Detected Declarations
function acpi_get_handlefunction acpi_get_namefunction methodsfunction acpi_install_method
Annotated Snippet
if (!prefix_node) {
return (AE_BAD_PARAMETER);
}
}
/*
* Valid cases are:
* 1) Fully qualified pathname
* 2) Parent + Relative pathname
*
* Error for <null Parent + relative path>
*/
if (ACPI_IS_ROOT_PREFIX(pathname[0])) {
/* Pathname is fully qualified (starts with '\') */
/* Special case for root-only, since we can't search for it */
if (!strcmp(pathname, ACPI_NS_ROOT_PATH)) {
*ret_handle =
ACPI_CAST_PTR(acpi_handle, acpi_gbl_root_node);
return (AE_OK);
}
} else if (!prefix_node) {
/* Relative path with null prefix is disallowed */
return (AE_BAD_PARAMETER);
}
/* Find the Node and convert to a handle */
status =
acpi_ns_get_node(prefix_node, pathname, ACPI_NS_NO_UPSEARCH, &node);
if (ACPI_SUCCESS(status)) {
*ret_handle = ACPI_CAST_PTR(acpi_handle, node);
}
return (status);
}
ACPI_EXPORT_SYMBOL(acpi_get_handle)
/******************************************************************************
*
* FUNCTION: acpi_get_name
*
* PARAMETERS: handle - Handle to be converted to a pathname
* name_type - Full pathname or single segment
* buffer - Buffer for returned path
*
* RETURN: Pointer to a string containing the fully qualified Name.
*
* DESCRIPTION: This routine returns the fully qualified name associated with
* the Handle parameter. This and the acpi_pathname_to_handle are
* complementary functions.
*
******************************************************************************/
acpi_status
acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer *buffer)
{
acpi_status status;
/* Parameter validation */
if (name_type > ACPI_NAME_TYPE_MAX) {
return (AE_BAD_PARAMETER);
}
status = acpi_ut_validate_buffer(buffer);
if (ACPI_FAILURE(status)) {
return (status);
}
/*
* Wants the single segment ACPI name.
* Validate handle and convert to a namespace Node
*/
status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE(status)) {
return (status);
}
if (name_type == ACPI_FULL_PATHNAME ||
name_type == ACPI_FULL_PATHNAME_NO_TRAILING) {
/* Get the full pathname (From the namespace root) */
status = acpi_ns_handle_to_pathname(handle, buffer,
name_type ==
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acnamesp.h`, `acparser.h`, `amlcode.h`.
- Detected declarations: `function acpi_get_handle`, `function acpi_get_name`, `function methods`, `function acpi_install_method`.
- 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.