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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -