parport_find_number(9)
π parport_find_number π
okay so bestie, we're in the Kernel API Manual today and this one is short and sweet β literally just "gimme the parallel port with this number." no cap. π
β¨ NAME β¨
parport_find_number β find a parallel port by number π¦
πΈ SYNOPSIS πΈ
struct parport * parport_find_number (int number );
π ARGUMENTS π
numberβ the parallel port number you're looking for. that's it, that's the whole argument. π
π«Ά DESCRIPTION π«Ά
so this function hands you back the parallel port that has the number you specified. iconic behaviour. and if there's no port with that number? you get NULL. respectfully, nothing. π
β οΈ heads up bestie, there's an implicit parport_get_port done for you already β like the function already took a reference out on your behalf, so you don't get to just ghost it.
and because there's already a reference you're holding, when you're done with the port that parport_find_number gave you, you gotta throw that reference away with parport_put_port. don't leave it hanging, that's giving memory leak energy and we do not stan. π
β SEE ALSO β
Kernel file ./drivers/parport/share.c β and the whole friend group:
__parport_register_driver(9)parport_unregister_driver(9)parport_get_port(9)parport_put_port(9)parport_register_port(9)parport_announce_port(9)parport_remove_port(9)parport_register_dev_model(9)parport_unregister_device(9)parport_find_base(9)parport_claim(9)parport_claim_or_block(9)parport_release(9)
π that's the whole vibe, bestie β now go find your port and remember to parport_put_port when you're done π
source dir: ./drivers/parport Β· dated: October 2026 Β· stay slay, stay referenced π§ββοΈβ¨
π¦ 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