adapter_remo..._free_device(9)
π adapter_remove_and_free_device(9) β¨
okay so this is a page straight out of the Kernel API Manual (yes, the kernel has a manual, and yes it's iconic) β and it's all about one very specific little cleanup moment in ./drivers/scsi/dc395x.c. stick with me bestie, it's short and it slays π
πΈ NAME πΈ
adapter_remove_and_free_device β removes a single device from the adapter, and then frees the device information. that's it. that's the whole job. one device in, one device out, memory released, no crumbs left behind π§
β¨ SYNOPSIS β¨
void adapter_remove_and_free_device (struct AdapterCtlBlk *acb , struct DeviceCtlBlk *dcb );
literally just two args, no return value, void and done π«Ά
π¦ ARGUMENTS π¦
acbβ the adapter device that's getting updated. this is the main character of this operation ngl πdcbβ a device that has previously been added to the adapter. key word: previously. it's already in the family, we're just seeing it out the door π
π SEE ALSO π
the whole friend group, fr fr β all these live in the kernel file ./drivers/scsi/dc395x.c:
set_safe_settings(9)fix_settings(9)eeprom_index_to_delay(9)delay_to_eeprom_index(9)eeprom_override(9)dc395x_queue_command_lck(9)dc395x_handle_interrupt(9)device_alloc(9)adapter_add_device(9)adapter_remove_device(9)adapter_remove_and_free_all_devices(9)dc395x_sdev_init(9)dc395x_sdev_destroy(9)trms1040_wait_30us(9)trms1040_write_cmd(9)trms1040_set_data(9)trms1040_write_all(9)trms1040_get_data(9)trms1040_read_all(9)check_eeprom(9)print_eeprom_settings(9)adapter_print_config(9)adapter_init_params(9)adapter_init_scsi_host(9)adapter_init_chip(9)adapter_init(9)adapter_uninit_chip(9)adapter_uninit(9)dc395x_init_one(9)dc395x_remove_one(9)
pro tip bestie: if you only want one device gone, you're in the right place β adapter_remove_and_free_all_devices(9) is the whole-group-exit version, and that's a different vibe entirely π
okay that's the page!! short, sweet, extremely functional π shoutout to ./drivers/scsi for hosting this masterpiece, dated October 2026 β mwah, periodt π
π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms