Skip to content

Commit 7d8c70d

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
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: Uwe Kleine-König <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent dc2454f commit 7d8c70d

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

drivers/tty/serial/atmel_serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2692,7 +2692,7 @@ static int atmel_init_gpios(struct atmel_uart_port *p, struct device *dev)
26922692
enum mctrl_gpio_idx i;
26932693
struct gpio_desc *gpiod;
26942694

2695-
p->gpios = mctrl_gpio_init(dev, 0);
2695+
p->gpios = mctrl_gpio_init_noauto(dev, 0);
26962696
if (IS_ERR(p->gpios))
26972697
return PTR_ERR(p->gpios);
26982698

drivers/tty/serial/clps711x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ static int uart_clps711x_probe(struct platform_device *pdev)
500500

501501
platform_set_drvdata(pdev, s);
502502

503-
s->gpios = mctrl_gpio_init(&pdev->dev, 0);
503+
s->gpios = mctrl_gpio_init_noauto(&pdev->dev, 0);
504504
if (IS_ERR(s->gpios))
505505
return PTR_ERR(s->gpios);
506506

drivers/tty/serial/mxs-auart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ static int mxs_auart_init_gpios(struct mxs_auart_port *s, struct device *dev)
11961196
enum mctrl_gpio_idx i;
11971197
struct gpio_desc *gpiod;
11981198

1199-
s->gpios = mctrl_gpio_init(dev, 0);
1199+
s->gpios = mctrl_gpio_init_noauto(dev, 0);
12001200
if (IS_ERR(s->gpios))
12011201
return PTR_ERR(s->gpios);
12021202

drivers/tty/serial/serial_mctrl_gpio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl)
8282
}
8383
EXPORT_SYMBOL_GPL(mctrl_gpio_get);
8484

85-
struct mctrl_gpios *mctrl_gpio_init(struct device *dev, unsigned int idx)
85+
struct mctrl_gpios *mctrl_gpio_init_noauto(struct device *dev, unsigned int idx)
8686
{
8787
struct mctrl_gpios *gpios;
8888
enum mctrl_gpio_idx i;
@@ -110,7 +110,7 @@ struct mctrl_gpios *mctrl_gpio_init(struct device *dev, unsigned int idx)
110110

111111
return gpios;
112112
}
113-
EXPORT_SYMBOL_GPL(mctrl_gpio_init);
113+
EXPORT_SYMBOL_GPL(mctrl_gpio_init_noauto);
114114

115115
void mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios)
116116
{

drivers/tty/serial/serial_mctrl_gpio.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios,
6565
* Returns a pointer to the allocated mctrl structure if ok, -ENOMEM on
6666
* allocation error.
6767
*/
68-
struct mctrl_gpios *mctrl_gpio_init(struct device *dev, unsigned int idx);
68+
struct mctrl_gpios *mctrl_gpio_init_noauto(struct device *dev,
69+
unsigned int idx);
6970

7071
/*
7172
* Free the mctrl_gpios structure.
@@ -95,7 +96,7 @@ struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios,
9596
}
9697

9798
static inline
98-
struct mctrl_gpios *mctrl_gpio_init(struct device *dev, unsigned int idx)
99+
struct mctrl_gpios *mctrl_gpio_init_noauto(struct device *dev, unsigned int idx)
99100
{
100101
return ERR_PTR(-ENOSYS);
101102
}

0 commit comments

Comments
 (0)