Skip to content

Commit

Permalink
Deployed 47a4b55 with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
TomSjtu committed Jan 28, 2024
1 parent 83a8417 commit 40a88bc
Show file tree
Hide file tree
Showing 5 changed files with 294 additions and 212 deletions.
2 changes: 1 addition & 1 deletion linux/drivers/chardev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ <h3 id="_4">设备号的注册与卸载(不推荐的做法)<a class="headerlink"
</code></pre></div></li>
</ul>
<p>这个方法在注册时需要手动指定主设备号,因此你必须事先知道哪个主设备号没有被占用,实际开发中并不推荐,并且该函数还一次性占用了主设备号下的全部次设备号。</p>
<p>如果一定要使用,必须要检查保存在<code>inode</code>结构中的次设备号是否被使用</p>
<p>如果一定要使用,必须要检查保存在<code>inode</code>结构中的次设备号是否被使用</p>
<ul>
<li>卸载
<div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="kt">int</span><span class="w"> </span><span class="n">unregister_chrdev</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">major</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">)</span>
Expand Down
Loading

0 comments on commit 40a88bc

Please sign in to comment.