Opening a character device from a helper driver?
yanegomi at gmail.com
Mon Jun 13 19:00:27 UTC 2011
Just to confirm whether or not this is the best way, say I had a
module foo(4) that pokes at /dev/bar0, which is attached to bar(4).
Should I setup the foo(4) driver with the same class as bar(4) and use
KPIs like device_get_parent(9) to get the device_t structure and pass
it along to bar(4)'s helper/ioctl functions, or is there a better way
to skin the proverbial cat?
I'm basing this observation off what I see in /sys/dev/uart_bus_puc.c .
More information about the freebsd-hackers