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:18:17 +0000 (09:18 +0200)
commit7ddc65cba192a0dbfd994856e64f0e1175635bd6
tree0f1c397346bb1b070e98afc6ff7df1f83a7fee15
parent7dbf1a7bef3e5ec586b050c81a2afbb8eac18ce6
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