__dfl_fpga_c...nd_port_data(9)
π
__dfl_fpga_cdev_find_port_data(9) β like, the whole vibe
okay bestie, so we're deep in the Kernel API Manual today β this one's a kernel function page, no cap, and it's honestly lowkey iconic how much it does with so few words. sit down, grab a strawberry π, let's go.
β¨ NAME β¨
__dfl_fpga_cdev_find_port_data β finds a port under a given container device. that's the whole job. she's a finder. a seeker. a "where's my port" specialist π΅οΈββοΈ
π¦ SYNOPSIS π¦
struct dfl_feature_dev_data * __dfl_fpga_cdev_find_port_data (struct
dfl_fpga_cdev *cdev , void *data , int (*match)(struct
dfl_feature_dev_data *, void *) );
yes the signature is kind of a mouthful, we don't make the rules π just copy it exactly and you'll be fine.
π ARGUMENTS π
cdevβ the container device. she's the main character energy of this whole operation, the one everything's living inside of πdataβ literally just data, bestie. it gets passed straight through to the match function, no questions asked.matchβ the match function, and honestly she's the picky one π§ it's the thing used to find a specific port out of the port device list, so likeβ¦ it decides who's the one.
πΈ DESCRIPTION πΈ
so basically: this finds a port device under a container device. that's it, that's the function π
β οΈ but listen β this function needs to be invoked with the lock held. not "should", not "maybe", needs. do not come for this function without your lock, i'm serious π
π RETURN π
- a pointer to the port's platform device if it worked out β¨ slay
NULLotherwise π it's giving "no thoughts, no port"
π₯ NOTE π₯
okay this is important, don't skip it:
you will need to drop the device reference with put_device after use. fr fr, if you forget, that reference just stays out there living its life and that's not the vibe π clean up after yourself, bestie π«Ά
π SEE ALSO π
the whole friend group, in order, no one left out:
- Kernel file
./drivers/fpga/dfl.c struct dfl_dev_info(9)struct dfl_chardev_info(9)dfl_fpga_port_ops_get(9)dfl_fpga_port_ops_put(9)dfl_fpga_port_ops_add(9)dfl_fpga_port_ops_del(9)dfl_fpga_check_port_id(9)dfl_fpga_dev_feature_uinit(9)dfl_fpga_dev_feature_init(9)dfl_fpga_dev_ops_register(9)dfl_fpga_dev_ops_unregister(9)struct build_feature_devs_info(9)struct dfl_feature_info(9)dfh_find_param(9)parse_feature(9)dfl_fpga_enum_info_add_dfl(9)dfl_fpga_enum_info_add_irq(9)dfl_fpga_feature_devs_enumerate(9)dfl_fpga_feature_devs_remove(9)dfl_fpga_cdev_release_port(9)dfl_fpga_cdev_assign_port(9)dfl_fpga_cdev_config_ports_pf(9)dfl_fpga_cdev_config_ports_vf(9)dfl_fpga_set_irq_triggers(9)dfl_feature_ioctl_get_num_irqs(9)dfl_feature_ioctl_set_irq(9)
like i said. the whole group chat π«Ά
and that's the page, bestie π sign-off time: this one lives in ./drivers/fpga, dated October 2026, and it's filed under the __dfl_fpga_c...nd_port_data(9) manual page β¨ go forth and find your ports, hold that lock, and put_device when you're done π
π
π¦ 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