Date: Mon, 13 Jun 2011 12:00:23 -0700 From: Garrett Cooper <yanegomi@gmail.com> To: freebsd-hackers@freebsd.org Subject: Opening a character device from a helper driver? Message-ID: <BANLkTi=_gHea17gcFWaNfzZjUUGEcXTJyA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, 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 . Thanks! -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTi=_gHea17gcFWaNfzZjUUGEcXTJyA>