spi: Rename of_spi_register_master() function

Rename this function to of_spi_get_gpio_numbers() as this
is what the function does, it does not register a master,
it is called in the path of registering a master so the
name is logical in a convoluted way, but it is better to
follow Rusty Russell's ABI level no 7:
"The obvious use is (probably) the correct one"

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20190808150321.23319-1-linus.walleij@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Linus Walleij 2019-08-08 17:03:21 +02:00 коммит произвёл Mark Brown
Родитель 920d947af9
Коммит 43004f31eb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 24D68B725D5487D0
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -2235,7 +2235,7 @@ struct spi_controller *__spi_alloc_controller(struct device *dev,
EXPORT_SYMBOL_GPL(__spi_alloc_controller);
#ifdef CONFIG_OF
static int of_spi_register_master(struct spi_controller *ctlr)
static int of_spi_get_gpio_numbers(struct spi_controller *ctlr)
{
int nb, i, *cs;
struct device_node *np = ctlr->dev.of_node;
@ -2268,7 +2268,7 @@ static int of_spi_register_master(struct spi_controller *ctlr)
return 0;
}
#else
static int of_spi_register_master(struct spi_controller *ctlr)
static int of_spi_get_gpio_numbers(struct spi_controller *ctlr)
{
return 0;
}
@ -2455,7 +2455,7 @@ int spi_register_controller(struct spi_controller *ctlr)
ctlr->mode_bits |= SPI_CS_HIGH;
} else {
/* Legacy code path for GPIOs from DT */
status = of_spi_register_master(ctlr);
status = of_spi_get_gpio_numbers(ctlr);
if (status)
return status;
}