Jim Cromie wrote:
im working on updating a drivers/char module to 2.6,
Ive got it working with cdevs, etc.
Id like to convert the printk(KERN_* "foo") calls to use dev_dbg() and
friends,
but I cannot see how to get a valid struct device for these char-devs.
Am I missing something ?
adding more details ..
module in question is scx200_gpio. It depends on scx200, which is
a pci device, so I *could* get a struct device ref there, *but*
thats not a general solution, and wont work for the other half
of the work; ie a new pc8736x_gpio module, which operates the
gpio unit on this Super-IO chip.
Can one get from THIS_MODULE, a struct module, thru its
struct module_kobject member, and its kobject, etc
by using a sequence of container_of() macros ?
If so, Im (obviously) not seeing how, despite hopping around in
~coywolf's .16-rc1 LXR
IOW, there doesnt seem to be any fixed module <-> device relationship
that I can grok. And module.h has no include for device.h
(though I dont suppose this precludes a more indirect & flexible
mechanism, which Im searching for)
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/