Re: [PATCH 11/12] drivers/tty/serial: don't use devm_pinctrl_get_select_default() in probe

2013-07-20 Thread Greg KH
On Sat, Jul 20, 2013 at 07:46:48PM +0200, Linus Walleij wrote:
> On Thu, Jul 11, 2013 at 9:40 AM, Nicolas Ferre  
> wrote:
> > On 10/07/2013 17:57, Wolfram Sang :
> >
> >> Since commit ab78029 (drivers/pinctrl: grab default handles from device
> >> core),
> >> we can rely on device core for setting the default pins. Compile tested
> >> only.
> >>
> >> Acked-by: Linus Walleij  (personally at LCE13)
> >> Signed-off-by: Wolfram Sang 
> >> ---
> >>   drivers/tty/serial/atmel_serial.c |8 
> >
> >
> > For atmel_serial.c:
> >
> > Acked-by: Nicolas Ferre 
> 
> Greg can you please apply this to the TTY tree if it looks
> OK to you?

Will do, thanks.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 11/12] drivers/tty/serial: don't use devm_pinctrl_get_select_default() in probe

2013-07-20 Thread Linus Walleij
On Thu, Jul 11, 2013 at 9:40 AM, Nicolas Ferre  wrote:
> On 10/07/2013 17:57, Wolfram Sang :
>
>> Since commit ab78029 (drivers/pinctrl: grab default handles from device
>> core),
>> we can rely on device core for setting the default pins. Compile tested
>> only.
>>
>> Acked-by: Linus Walleij  (personally at LCE13)
>> Signed-off-by: Wolfram Sang 
>> ---
>>   drivers/tty/serial/atmel_serial.c |8 
>
>
> For atmel_serial.c:
>
> Acked-by: Nicolas Ferre 

Greg can you please apply this to the TTY tree if it looks
OK to you?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 11/12] drivers/tty/serial: don't use devm_pinctrl_get_select_default() in probe

2013-07-11 Thread Nicolas Ferre

On 10/07/2013 17:57, Wolfram Sang :

Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
we can rely on device core for setting the default pins. Compile tested only.

Acked-by: Linus Walleij  (personally at LCE13)
Signed-off-by: Wolfram Sang 
---
  drivers/tty/serial/atmel_serial.c |8 


For atmel_serial.c:

Acked-by: Nicolas Ferre 

Thanks.


  drivers/tty/serial/imx.c  |9 -
  drivers/tty/serial/mxs-auart.c|8 
  drivers/tty/serial/omap-serial.c  |9 -
  4 files changed, 34 deletions(-)

diff --git a/drivers/tty/serial/atmel_serial.c 
b/drivers/tty/serial/atmel_serial.c
index 691265f..0e39fac 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -39,7 +39,6 @@
  #include 
  #include 
  #include 
-#include 
  #include 

  #include 
@@ -1775,7 +1774,6 @@ static int atmel_serial_probe(struct platform_device 
*pdev)
struct atmel_uart_data *pdata = pdev->dev.platform_data;
void *data;
int ret = -ENODEV;
-   struct pinctrl *pinctrl;

BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));

@@ -1809,12 +1807,6 @@ static int atmel_serial_probe(struct platform_device 
*pdev)
if (ret)
goto err;

-   pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-   if (IS_ERR(pinctrl)) {
-   ret = PTR_ERR(pinctrl);
-   goto err;
-   }
-
if (!atmel_use_dma_rx(&port->uart)) {
ret = -ENOMEM;
data = kmalloc(sizeof(struct atmel_uart_char)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 415cec6..2797e55 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -47,7 +47,6 @@
  #include 
  #include 
  #include 
-#include 
  #include 

  #include 
@@ -1507,7 +1506,6 @@ static int serial_imx_probe(struct platform_device *pdev)
void __iomem *base;
int ret = 0;
struct resource *res;
-   struct pinctrl *pinctrl;

sport = devm_kzalloc(&pdev->dev, sizeof(*sport), GFP_KERNEL);
if (!sport)
@@ -1543,13 +1541,6 @@ static int serial_imx_probe(struct platform_device *pdev)
sport->timer.function = imx_timeout;
sport->timer.data = (unsigned long)sport;

-   pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-   if (IS_ERR(pinctrl)) {
-   ret = PTR_ERR(pinctrl);
-   dev_err(&pdev->dev, "failed to get default pinctrl: %d\n", ret);
-   return ret;
-   }
-
sport->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
if (IS_ERR(sport->clk_ipg)) {
ret = PTR_ERR(sport->clk_ipg);
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 4f5f161..a63a20e 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -32,7 +32,6 @@
  #include 
  #include 
  #include 
-#include 
  #include 
  #include 
  #include 
@@ -1015,7 +1014,6 @@ static int mxs_auart_probe(struct platform_device *pdev)
u32 version;
int ret = 0;
struct resource *r;
-   struct pinctrl *pinctrl;

s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL);
if (!s) {
@@ -1029,12 +1027,6 @@ static int mxs_auart_probe(struct platform_device *pdev)
else if (ret < 0)
goto out_free;

-   pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-   if (IS_ERR(pinctrl)) {
-   ret = PTR_ERR(pinctrl);
-   goto out_free;
-   }
-
if (of_id) {
pdev->id_entry = of_id->data;
s->devtype = pdev->id_entry->driver_data;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index b6d1728..eacb0de 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -40,7 +40,6 @@
  #include 
  #include 
  #include 
-#include 
  #include 

  #define OMAP_MAX_HSUART_PORTS 6
@@ -160,7 +159,6 @@ struct uart_omap_port {
u32 latency;
u32 calc_latency;
struct work_struct  qos_work;
-   struct pinctrl  *pins;
boolis_suspending;
  };

@@ -1468,13 +1466,6 @@ static int serial_omap_probe(struct platform_device 
*pdev)
goto err_port_line;
}

-   up->pins = devm_pinctrl_get_select_default(&pdev->dev);
-   if (IS_ERR(up->pins)) {
-   dev_warn(&pdev->dev, "did not get pins for uart%i error: %li\n",
-up->port.line, PTR_ERR(up->pins));
-   up->pins = NULL;
-   }
-
sprintf(up->name, "OMAP UART%d", up->port.line);
up->port.mapbase = mem->start;
up->port.membase = devm_ioremap(&pdev->dev, mem->start,




--
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More m

[PATCH 11/12] drivers/tty/serial: don't use devm_pinctrl_get_select_default() in probe

2013-07-10 Thread Wolfram Sang
Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
we can rely on device core for setting the default pins. Compile tested only.

Acked-by: Linus Walleij  (personally at LCE13)
Signed-off-by: Wolfram Sang 
---
 drivers/tty/serial/atmel_serial.c |8 
 drivers/tty/serial/imx.c  |9 -
 drivers/tty/serial/mxs-auart.c|8 
 drivers/tty/serial/omap-serial.c  |9 -
 4 files changed, 34 deletions(-)

diff --git a/drivers/tty/serial/atmel_serial.c 
b/drivers/tty/serial/atmel_serial.c
index 691265f..0e39fac 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -39,7 +39,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -1775,7 +1774,6 @@ static int atmel_serial_probe(struct platform_device 
*pdev)
struct atmel_uart_data *pdata = pdev->dev.platform_data;
void *data;
int ret = -ENODEV;
-   struct pinctrl *pinctrl;
 
BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));
 
@@ -1809,12 +1807,6 @@ static int atmel_serial_probe(struct platform_device 
*pdev)
if (ret)
goto err;
 
-   pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-   if (IS_ERR(pinctrl)) {
-   ret = PTR_ERR(pinctrl);
-   goto err;
-   }
-
if (!atmel_use_dma_rx(&port->uart)) {
ret = -ENOMEM;
data = kmalloc(sizeof(struct atmel_uart_char)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 415cec6..2797e55 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -47,7 +47,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -1507,7 +1506,6 @@ static int serial_imx_probe(struct platform_device *pdev)
void __iomem *base;
int ret = 0;
struct resource *res;
-   struct pinctrl *pinctrl;
 
sport = devm_kzalloc(&pdev->dev, sizeof(*sport), GFP_KERNEL);
if (!sport)
@@ -1543,13 +1541,6 @@ static int serial_imx_probe(struct platform_device *pdev)
sport->timer.function = imx_timeout;
sport->timer.data = (unsigned long)sport;
 
-   pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-   if (IS_ERR(pinctrl)) {
-   ret = PTR_ERR(pinctrl);
-   dev_err(&pdev->dev, "failed to get default pinctrl: %d\n", ret);
-   return ret;
-   }
-
sport->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
if (IS_ERR(sport->clk_ipg)) {
ret = PTR_ERR(sport->clk_ipg);
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 4f5f161..a63a20e 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -1015,7 +1014,6 @@ static int mxs_auart_probe(struct platform_device *pdev)
u32 version;
int ret = 0;
struct resource *r;
-   struct pinctrl *pinctrl;
 
s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL);
if (!s) {
@@ -1029,12 +1027,6 @@ static int mxs_auart_probe(struct platform_device *pdev)
else if (ret < 0)
goto out_free;
 
-   pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-   if (IS_ERR(pinctrl)) {
-   ret = PTR_ERR(pinctrl);
-   goto out_free;
-   }
-
if (of_id) {
pdev->id_entry = of_id->data;
s->devtype = pdev->id_entry->driver_data;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index b6d1728..eacb0de 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -40,7 +40,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #define OMAP_MAX_HSUART_PORTS  6
@@ -160,7 +159,6 @@ struct uart_omap_port {
u32 latency;
u32 calc_latency;
struct work_struct  qos_work;
-   struct pinctrl  *pins;
boolis_suspending;
 };
 
@@ -1468,13 +1466,6 @@ static int serial_omap_probe(struct platform_device 
*pdev)
goto err_port_line;
}
 
-   up->pins = devm_pinctrl_get_select_default(&pdev->dev);
-   if (IS_ERR(up->pins)) {
-   dev_warn(&pdev->dev, "did not get pins for uart%i error: %li\n",
-up->port.line, PTR_ERR(up->pins));
-   up->pins = NULL;
-   }
-
sprintf(up->name, "OMAP UART%d", up->port.line);
up->port.mapbase = mem->start;
up->port.membase = devm_ioremap(&pdev->dev, mem->start,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/