title: Linux PCIe Driver: What to use for private data structure?
body: <p>I'm creating my first PCIe driver for Linux and have a question regarding which structure to use for the <code>pci_set_drvdata()</code> function. </p>
  
  <p>The PCIe hardware is built in house and we will be using DMA to send data to and from the device. It is not a sound card or any other subsystem which needs to be plugged into the kernel.</p>
  
  <p>When I look at examples there seems to be a specific <code>struct</code> to fill in and then send to <code>pci_set_drvdata()</code>. </p>
  
  <p>What do I fill in for this case? Do I simply ignore this and send in a blank structure? The line I am referring to in any PCIe driver is:</p>
  
  <pre><code>struct structure_in_question *my_struct;
  my_struct = kzalloc( sizeof(*my_struct), GFP_KERNEL) );
  </code></pre>
  
  <p>This is usually found in the <code>probe()</code> function.</p>