<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 4, 2014 at 12:00 PM, Pranay Srivastava <span dir="ltr">&lt;<a href="mailto:pranjas@gmail.com" target="_blank">pranjas@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><p><br>
On Mar 4, 2014 7:47 AM, &quot;J.Hwan Kim&quot; &lt;<a href="mailto:kernel.frog.007@gmail.com" target="_blank">kernel.frog.007@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi, everyone<br>
&gt;<br>
&gt; When I use /proc file system in communicating between kernel and user space,<br>
&gt; is the usage count of moudule automatically incremented or decremented?</p>
</div><p>I don&#39;t think so.</p><div class="">
<p>&gt;<br>
&gt; I register proc file via create_proc_entry() and use .open, .close and<br>
&gt; .mmap not using .read and .write function.<br>
&gt;<br>
&gt; Please give me any hint..<br>
&gt;<br>
&gt; Thanks in advance<br>
&gt;</p>
</div><p>You can do that by doing fops_get <br>
Or module_get.</p><div class=""><div class="h5">
<p>&gt; Best Regards,<br>
&gt;<br>
&gt; J.Hwan Kim<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Kernelnewbies mailing list<br>
&gt; <a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
&gt; <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a></p>
</div></div><br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">This may help.<br><br><a href="http://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module">http://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module</a><br clear="all">

</div><div class="gmail_extra"><br>-- <br>Regards,<br>Rishi Agrawal<br>
</div></div>