Commit 7d8c70d8 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman

serial: mctrl-gpio: rename init function

This is done before adding more functionality to the init function with
the existing name. As this new functionality conflicts with stuff
drivers are required to implement themselves up to I want to convert
them one by one to make reviewing and reverting more easy in case I
broke something.

Once mctrl_gpio_init is there and all drivers are converted
mctrl_gpio_init_noauto can be removed again.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dc2454f7
...@@ -2692,7 +2692,7 @@ static int atmel_init_gpios(struct atmel_uart_port *p, struct device *dev) ...@@ -2692,7 +2692,7 @@ static int atmel_init_gpios(struct atmel_uart_port *p, struct device *dev)
enum mctrl_gpio_idx i; enum mctrl_gpio_idx i;
struct gpio_desc *gpiod; struct gpio_desc *gpiod;
p->gpios = mctrl_gpio_init(dev, 0); p->gpios = mctrl_gpio_init_noauto(dev, 0);
if (IS_ERR(p->gpios)) if (IS_ERR(p->gpios))
return PTR_ERR(p->gpios); return PTR_ERR(p->gpios);
......
...@@ -500,7 +500,7 @@ static int uart_clps711x_probe(struct platform_device *pdev) ...@@ -500,7 +500,7 @@ static int uart_clps711x_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, s); platform_set_drvdata(pdev, s);
s->gpios = mctrl_gpio_init(&pdev->dev, 0); s->gpios = mctrl_gpio_init_noauto(&pdev->dev, 0);
if (IS_ERR(s->gpios)) if (IS_ERR(s->gpios))
return PTR_ERR(s->gpios); return PTR_ERR(s->gpios);
......
...@@ -1196,7 +1196,7 @@ static int mxs_auart_init_gpios(struct mxs_auart_port *s, struct device *dev) ...@@ -1196,7 +1196,7 @@ static int mxs_auart_init_gpios(struct mxs_auart_port *s, struct device *dev)
enum mctrl_gpio_idx i; enum mctrl_gpio_idx i;
struct gpio_desc *gpiod; struct gpio_desc *gpiod;
s->gpios = mctrl_gpio_init(dev, 0); s->gpios = mctrl_gpio_init_noauto(dev, 0);
if (IS_ERR(s->gpios)) if (IS_ERR(s->gpios))
return PTR_ERR(s->gpios); return PTR_ERR(s->gpios);
......
...@@ -82,7 +82,7 @@ unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl) ...@@ -82,7 +82,7 @@ unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl)
} }
EXPORT_SYMBOL_GPL(mctrl_gpio_get); EXPORT_SYMBOL_GPL(mctrl_gpio_get);
struct mctrl_gpios *mctrl_gpio_init(struct device *dev, unsigned int idx) struct mctrl_gpios *mctrl_gpio_init_noauto(struct device *dev, unsigned int idx)
{ {
struct mctrl_gpios *gpios; struct mctrl_gpios *gpios;
enum mctrl_gpio_idx i; enum mctrl_gpio_idx i;
...@@ -110,7 +110,7 @@ struct mctrl_gpios *mctrl_gpio_init(struct device *dev, unsigned int idx) ...@@ -110,7 +110,7 @@ struct mctrl_gpios *mctrl_gpio_init(struct device *dev, unsigned int idx)
return gpios; return gpios;
} }
EXPORT_SYMBOL_GPL(mctrl_gpio_init); EXPORT_SYMBOL_GPL(mctrl_gpio_init_noauto);
void mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios) void mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios)
{ {
......
...@@ -65,7 +65,8 @@ struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios, ...@@ -65,7 +65,8 @@ struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios,
* Returns a pointer to the allocated mctrl structure if ok, -ENOMEM on * Returns a pointer to the allocated mctrl structure if ok, -ENOMEM on
* allocation error. * allocation error.
*/ */
struct mctrl_gpios *mctrl_gpio_init(struct device *dev, unsigned int idx); struct mctrl_gpios *mctrl_gpio_init_noauto(struct device *dev,
unsigned int idx);
/* /*
* Free the mctrl_gpios structure. * Free the mctrl_gpios structure.
...@@ -95,7 +96,7 @@ struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios, ...@@ -95,7 +96,7 @@ struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios,
} }
static inline static inline
struct mctrl_gpios *mctrl_gpio_init(struct device *dev, unsigned int idx) struct mctrl_gpios *mctrl_gpio_init_noauto(struct device *dev, unsigned int idx)
{ {
return ERR_PTR(-ENOSYS); return ERR_PTR(-ENOSYS);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment