Linux PCIe Driver: What to use for private data structure? -
i'm creating first pcie driver linux , have question regarding structure use pci_set_drvdata() function.
the pcie hardware built in house , using dma send data , device. not sound card or other subsystem needs plugged kernel.
when @ examples there seems specific struct fill in , send pci_set_drvdata().
what fill in case? ignore , send in blank structure? line referring in pcie driver is:
struct structure_in_question *my_struct; my_struct = kzalloc( sizeof(*my_struct), gfp_kernel) ); this found in probe() function.
that function used associating device private data cannot supplied other way. if there no such data function should not used.
Comments
Post a Comment