2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 22:53:55 +08:00
linux-next/Documentation/driver-api/gpio
Joe Perches 05a5f51ca5 Documentation: Replace lkml.org links with lore
Replace the lkml.org links with lore to better use a single source
that's more likely to stay available long-term.

Done by bash script:

cvt_lkml_to_lore ()
{
    tmpfile=$(mktemp ./.cvt_links.XXXXXXX)

    header=$(echo $1 | sed 's@/lkml/@/lkml/headers/@')

    wget -qO - $header > $tmpfile
    if [[ $? == 0 ]] ; then
	link=$(grep -i '^Message-Id:' $tmpfile | head -1 | \
		   sed -r -e 's/^\s*Message-Id:\s*<\s*//' -e  's/\s*>\s*$//' -e 's@^@https://lore.kernel.org/r/@')
	#    echo "testlink: $link"
	if [ -n "$link" ] ; then
	    wget -qO - $link > /dev/null
	    if [[ $? == 0 ]] ; then
		echo $link
	    fi
	fi
    fi

    rm -f $tmpfile
}

git grep -P -o "\bhttps?://(?:www.)?lkml.org/lkml[\/\w]+" $@ |
    while read line ; do
	echo $line
	file=$(echo $line | cut -f1 -d':')
	link=$(echo $line | cut -f2- -d':')
	newlink=$(cvt_lkml_to_lore $link)
	if [[ -n "$newlink" ]] ; then
	    sed -i -e "s#\b$link\b#$newlink#" $file
	fi
    done

Link: https://lore.kernel.org/patchwork/patch/1265849/#1462688
Signed-off-by: Joe Perches <joe@perches.com>
Link: https://lore.kernel.org/r/77cdb7f32cfb087955bfc3600b86c40bed5d4104.camel@perches.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-01-11 12:47:38 -07:00
..
board.rst gpiolib: Add support for GPIO lookup by line name 2020-05-18 10:12:42 +02:00
bt8xxgpio.rst docs: driver-api: bt8xxgpio: Revive dead link 2019-10-09 11:13:36 +02:00
consumer.rst Documentation: gpio: fix typo and unclear legacy API section 2020-12-05 20:23:34 +01:00
driver.rst Documentation: Replace lkml.org links with lore 2021-01-11 12:47:38 -07:00
drivers-on-gpio.rst gpio: Add gpio-charger to the documentation 2020-07-07 13:52:33 +02:00
index.rst gpio: Add use guidance documentation 2020-01-15 11:11:43 +01:00
intro.rst Documentation: gpio: Move introduction to driver-api 2018-03-23 04:20:30 +01:00
legacy.rst Documentation: gpio: legacy: Don't use POLLERR for poll(2) 2019-02-20 10:53:52 +01:00
using-gpio.rst gpio: Add use guidance documentation 2020-01-15 11:11:43 +01:00