spi_unregister_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ spi_unregister_device(9) ✨

okay so this is a page from the Kernel API Manual, and it's honestly short and sweet β€” a little one-function wonder. let's get into it, bestie 🫢


πŸ’– NAME πŸ’–

spi_unregister_device β€” unregister a single SPI device

like, one (1) device. singular. not the whole bus. we'll get to that 🌸


πŸŽ€ SYNOPSIS πŸŽ€

void spi_unregister_device (struct spi_device *spi );

that's it. that's the whole call. returns nothing (void), takes one pointer. clean, minimal, iconic πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • spi β€” the spi_device you wanna unregister. the one that's gonna get un-registered. the main character of this operation πŸ‘‘

🌈 DESCRIPTION 🌈

Start making the passed SPI device vanish ✨ poof, gone, bye.

okay but fr β€” ngl, normally this would be handled by spi_unregister_controller instead. like, the controller cleanup takes care of it for you in the usual flow. so if you're out here calling this bad boy manually, just know there's a higher-level path that usually does the job 🫢

no cap, this is the "single device" exit door β€” the controller-wide one is a whole different function, and the manual is very clear that it's the normal route πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

so this is the part where the manpage just dumps the entire SPI neighbourhood on you, and honestly? it's giving "group chat with 46 members and everyone's typing" 😭 but here they all are, no skips, no cuts:

Kernel file ./drivers/spi/spi.c

__spi_register_driver(9), spi_alloc_device(9), spi_add_device(9), spi_new_device(9), spi_register_board_info(9), spi_res_alloc(9), spi_res_free(9), spi_res_add(9), spi_res_release(9), spi_finalize_current_transfer(9), __spi_pump_messages(9), spi_pump_messages(9), spi_take_timestamp_pre(9), spi_take_timestamp_post(9), spi_set_thread_rt(9), spi_get_next_queued_message(9), spi_finalize_current_message(9), spi_queued_transfer(9), spi_flush_queue(9), of_register_spi_devices(9), spi_new_ancillary_device(9), devm_spi_new_ancillary_device(9), acpi_spi_count_resources(9), acpi_spi_device_alloc(9), spi_target_abort(9), __spi_alloc_controller(9), __devm_spi_alloc_controller(9), spi_get_gpio_descs(9), spi_register_controller(9), devm_spi_register_controller(9), spi_unregister_controller(9), spi_replace_transfers(9), spi_split_transfers_maxsize(9), spi_split_transfers_maxwords(9), spi_set_cs_timing(9), spi_setup(9), spi_optimize_message(9), spi_unoptimize_message(9), devm_spi_optimize_message(9), spi_async(9), spi_sync(9), spi_sync_locked(9), spi_bus_lock(9), spi_bus_unlock(9), spi_write_then_read(9)

iykyk πŸ§šπŸ’œ


and that's the whole page, bestie β€” file's from ./drivers/spi, dated October 2026, and it's spi_unregister_device(9) signing off. slay, go unregister something (responsibly, and probably via spi_unregister_controller). periodt πŸ’…βœ¨

πŸ“¦ where this page comes from