aboutsummaryrefslogtreecommitdiff
path: root/docs/sphinx/kerneldoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'docs/sphinx/kerneldoc.py')
-rw-r--r--docs/sphinx/kerneldoc.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/sphinx/kerneldoc.py b/docs/sphinx/kerneldoc.py
index 3ac277d162..bf44215016 100644
--- a/docs/sphinx/kerneldoc.py
+++ b/docs/sphinx/kerneldoc.py
@@ -69,6 +69,11 @@ class KernelDocDirective(Directive):
env = self.state.document.settings.env
cmd = env.config.kerneldoc_bin + ['-rst', '-enable-lineno']
+ # Pass the version string to kernel-doc, as it needs to use a different
+ # dialect, depending what the C domain supports for each specific
+ # Sphinx versions
+ cmd += ['-sphinx-version', sphinx.__version__]
+
filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
export_file_patterns = []
@@ -99,7 +104,6 @@ class KernelDocDirective(Directive):
env.note_dependency(os.path.abspath(f))
cmd += ['-export-file', f]
- cmd += ['-sphinx-version', sphinx.__version__]
cmd += [filename]
try: