1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct dvb_device</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="ch06s02.html" title="Digital TV (DVB) devices"><link rel="prev" href="API-struct-dvb-adapter.html" title="struct dvb_adapter"><link rel="next" href="API-dvb-register-adapter.html" title="dvb_register_adapter"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct dvb_device</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-dvb-adapter.html">Prev</a> </td><th width="60%" align="center">Digital TV (DVB) devices</th><td width="20%" align="right"> <a accesskey="n" href="API-dvb-register-adapter.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-dvb-device"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct dvb_device — 2 represents a DVB device node 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct dvb_device { 5 struct list_head list_head; 6 const struct file_operations * fops; 7 struct dvb_adapter * adapter; 8 int type; 9 int minor; 10 u32 id; 11 int readers; 12 int writers; 13 int users; 14 wait_queue_head_t wait_queue; 15 int (* kernel_ioctl) (struct file *file, unsigned int cmd, void *arg); 16#if defined(CONFIG_MEDIA_CONTROLLER_DVB) 17 const char * name; 18 struct media_entity * entity; 19 struct media_pad * pads; 20#endif 21 void * priv; 22}; </pre></div><div class="refsect1"><a name="id-1.8.3.27.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">list_head</span></dt><dd><p> 23 List head with all DVB devices 24 </p></dd><dt><span class="term">fops</span></dt><dd><p> 25 pointer to struct file_operations 26 </p></dd><dt><span class="term">adapter</span></dt><dd><p> 27 pointer to the adapter that holds this device node 28 </p></dd><dt><span class="term">type</span></dt><dd><p> 29 type of the device: DVB_DEVICE_SEC, DVB_DEVICE_FRONTEND, 30 DVB_DEVICE_DEMUX, DVB_DEVICE_DVR, DVB_DEVICE_CA, DVB_DEVICE_NET 31 </p></dd><dt><span class="term">minor</span></dt><dd><p> 32 devnode minor number. Major number is always DVB_MAJOR. 33 </p></dd><dt><span class="term">id</span></dt><dd><p> 34 device ID number, inside the adapter 35 </p></dd><dt><span class="term">readers</span></dt><dd><p> 36 Initialized by the caller. Each call to <code class="function">open</code> in Read Only mode 37 decreases this counter by one. 38 </p></dd><dt><span class="term">writers</span></dt><dd><p> 39 Initialized by the caller. Each call to <code class="function">open</code> in Read/Write 40 mode decreases this counter by one. 41 </p></dd><dt><span class="term">users</span></dt><dd><p> 42 Initialized by the caller. Each call to <code class="function">open</code> in any mode 43 decreases this counter by one. 44 </p></dd><dt><span class="term">wait_queue</span></dt><dd><p> 45 wait queue, used to wait for certain events inside one of 46 the DVB API callers 47 </p></dd><dt><span class="term">kernel_ioctl</span></dt><dd><p> 48 callback function used to handle ioctl calls from userspace. 49 </p></dd><dt><span class="term">name</span></dt><dd><p> 50 Name to be used for the device at the Media Controller 51 </p></dd><dt><span class="term">entity</span></dt><dd><p> 52 pointer to struct media_entity associated with the device node 53 </p></dd><dt><span class="term">pads</span></dt><dd><p> 54 pointer to struct media_pad associated with <em class="parameter"><code>entity</code></em>; 55 </p></dd><dt><span class="term">priv</span></dt><dd><p> 56 private data 57 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.8.3.27.6"></a><h2>Description</h2><p> 58 This structure is used by the DVB core (frontend, CA, net, demux) in 59 order to create the device nodes. Usually, driver should not initialize 60 this struct diretly. 61</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-dvb-adapter.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch06s02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-dvb-register-adapter.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct dvb_adapter</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">dvb_register_adapter</span></td></tr></table></div></body></html> 62