doc: Cope with the deprecation of AutoReporter
authorJonathan Corbet <corbet@lwn.net>
Tue, 21 May 2019 20:42:34 +0000 (14:42 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Jun 2019 07:17:20 +0000 (09:17 +0200)
commitc0742228bba633537f3d268275a4bdb93afbdc50
tree7c6429e52f79355f3fb7e5d579073ced23f451a6
parent301b18edbf5673ceabd096e95bff0d4cd228a854
doc: Cope with the deprecation of AutoReporter

commit 2404dad1f67f8917e30fc22a85e0dbcc85b99955 upstream.

AutoReporter is going away; recent versions of sphinx emit a warning like:

  Documentation/sphinx/kerneldoc.py:125:
      RemovedInSphinx20Warning: AutodocReporter is now deprecated.
      Use sphinx.util.docutils.switch_source_input() instead.

Make the switch.  But switch_source_input() only showed up in 1.7, so we
have to do ugly version checks to keep things working in older versions.

Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/sphinx/kerneldoc.py