acpi_dev_get_dma_resources(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… acpi_dev_get_dma_resources(9)

okay so bestie, welcome to the Kernel API Manual ✨ this one's a kernel function page, and honestly? it's giving "small but mighty." let's get into it 🫢


✨ NAME ✨

acpi_dev_get_dma_resources β€” get current DMA resources of a device πŸ’–


🌸 SYNOPSIS 🌸

int acpi_dev_get_dma_resources (struct acpi_device *adev , struct
       list_head *list );

like, that's the whole signature. copy it exactly, no cap πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • adev β€” the ACPI device node you wanna get the resources for πŸ¦‹
  • list β€” head of the resultant list of resources. and listen, it must be empty β€” no sneaky leftovers, okay? πŸ™ˆ

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so what this actually does: it evaluates the _DMA method for the device node you passed in, and then processes whatever that method spits out ✨

the resultant struct resource objects get put onto the list that list points to β€” and remember, that list has to be empty at the start, fr fr. they go on there as members of struct resource_entry objects πŸ’«

🚨 bestie heads up: callers of this routine should use acpi_dev_free_resource_list to free that list. don't just leave it hanging, that's not the vibe πŸ’€

and the returns? on success you get the number of resources in the output list back πŸ”₯ otherwise you get an error code that reflects whatever error condition happened, and that's on periodt 😭


🌈 SEE ALSO 🌈

kernel file ./drivers/acpi/resource.c plus these iconic little functions, go check 'em out iykyk:


and that's the page!! 🧚 mwah, slay, go read the whole set πŸ’œ

this lil sign-off is brought to you by ./drivers/acpi, dated October 2026, and your girl acpi_dev_get_dma_resources(9) β€” bye bestie, drink some water and free your resource lists πŸ’–πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from