doc: Cope with the deprecation of AutoReporter
authorJonathan Corbet <corbet@lwn.net>
Tue, 21 May 2019 20:42:34 +0000 (14:42 -0600)
committerJonathan Corbet <corbet@lwn.net>
Thu, 23 May 2019 15:23:11 +0000 (09:23 -0600)
commit2404dad1f67f8917e30fc22a85e0dbcc85b99955
treec1fee7c5cf8d2444bb7bfa510935668402293a28
parent096ea522e84ea68f8e6c41e5e7294731a81e29bc
doc: Cope with the deprecation of AutoReporter

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>
Documentation/sphinx/kerneldoc.py