docs: driver-api: properly format ToC headings
authorVegard Nossum <vegard.nossum@oracle.com>
Fri, 27 Oct 2023 08:18:25 +0000 (10:18 +0200)
committerJonathan Corbet <corbet@lwn.net>
Fri, 17 Nov 2023 20:05:26 +0000 (13:05 -0700)
"class:: toc-title" was a workaround for older Sphinx versions that are
no longer supported.

The canonical way to add a heading to the ToC is to use :caption:.
Do that.

Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: SeongJae Park <sj@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Armin Wolf <W_Armin@gmx.de>
Cc: Iwona Winiarska <iwona.winiarska@intel.com>
Cc: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: linux-media@vger.kernel.org
Cc: Yanteng Si <siyanteng@loongson.cn>
Cc: Alex Shi <alexs@kernel.org>
Cc: Wu XiangCheng <bobwxc@email.cn>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20231027081830.195056-7-vegard.nossum@oracle.com
Documentation/driver-api/index.rst
Documentation/driver-api/media/index.rst
Documentation/driver-api/mei/index.rst
Documentation/driver-api/pci/index.rst
Documentation/translations/zh_CN/driver-api/gpio/index.rst
Documentation/translations/zh_CN/driver-api/index.rst

index 1e16a40..4540f79 100644 (file)
@@ -9,11 +9,8 @@ of device drivers.  This document is an only somewhat organized collection
 of some of those interfaces — it will hopefully get better over time!  The
 available subsections can be seen below.
 
-.. class:: toc-title
-
-          Table of contents
-
 .. toctree::
+   :caption: Table of contents
    :maxdepth: 2
 
    driver-model/index
index 08e2065..d559318 100644 (file)
@@ -20,13 +20,8 @@ Documentation/userspace-api/media/index.rst
   - for the userspace APIs used on media devices.
 
 
-.. only:: html
-
-   .. class:: toc-title
-
-        Table of Contents
-
 .. toctree::
+    :caption: Table of Contents
     :maxdepth: 5
     :numbered:
 
index 3a22b52..eae6f18 100644 (file)
@@ -9,13 +9,8 @@ Intel(R) Management Engine Interface (Intel(R) MEI)
 **Copyright** |copy| 2019 Intel Corporation
 
 
-.. only:: html
-
-   .. class:: toc-title
-
-        Table of Contents
-
 .. toctree::
+   :caption: Table of Contents
    :maxdepth: 3
 
    mei
index c6cf1fe..a38e475 100644 (file)
@@ -4,11 +4,8 @@
 The Linux PCI driver implementer's API guide
 ============================================
 
-.. class:: toc-title
-
-          Table of contents
-
 .. toctree::
+   :caption: Table of contents
    :maxdepth: 2
 
    pci
index 9ab64e9..9a6a141 100644 (file)
@@ -14,9 +14,8 @@
 通用型输入/输出(GPIO)
 =======================
 
-目录:
-
 .. toctree::
+   :caption: 目录
    :maxdepth: 2
 
    legacy
index ba354e1..92ff1b7 100644 (file)
@@ -17,11 +17,8 @@ Linux驱动实现者的API指南
 内核提供了各种各样的接口来支持设备驱动的开发。这份文档只是对其中一些接口进行了
 一定程度的整理——希望随着时间的推移,它能变得更好!可用的小节可以在下面看到。
 
-.. class:: toc-title
-
-          目录列表:
-
 .. toctree::
+   :caption: 目录列表
    :maxdepth: 2
 
    gpio/index