title: C empty struct -- what does this mean/do?
body: <p>I found this code in a header file for a device that I need to use, and although I've been doing C for years, I've never run into this:</p>
  
  <pre><code>struct device {
  };
  
  struct spi_device {
      struct device dev;
  };
  </code></pre>
  
  <p>and it used as in:</p>
  
  <pre><code>int spi_write_then_read(struct spi_device *spi, 
  const unsigned char *txbuf, unsigned n_tx,
  unsigned char *rxbuf, unsigned n_rx);
  </code></pre>
  
  <p>and also here:</p>
  
  <pre><code>struct spi_device *spi = phy-&gt;spi;
  </code></pre>
  
  <p>where it is defined the same.</p>
  
  <p>I'm not sure what the point is with this definition. It is in a header file for a linux application of the board, but am baffled by it use.  Any explanations, ideas?  Anyone seen this before (I'm sure some of you have :).</p>
  
  <p>Thanks!
  :bp:</p>