Patchwork [U-Boot] HACK: fix return value of serial_assign to get printfs working again

login
register
mail settings
Submitter Allen Martin
Date Oct. 20, 2012, 7:12 a.m.
Message ID <1350717121-4657-1-git-send-email-amartin@nvidia.com>
Download mbox | patch
Permalink /patch/192907/
State Rejected
Delegated to: Tom Warren
Headers show

Comments

Allen Martin - Oct. 20, 2012, 7:12 a.m.
This reverts a recent change to serial_assign() that broke printfs on
tegra.  I don't think this is the real fix, but I'm just putting this
out for others who want to test tegra patches for the other
regressions.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 drivers/serial/serial.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Marek Vasut - Oct. 20, 2012, 8:19 a.m.
Dear Allen Martin,

> This reverts a recent change to serial_assign() that broke printfs on
> tegra.  I don't think this is the real fix, but I'm just putting this
> out for others who want to test tegra patches for the other
> regressions.
> 
> Signed-off-by: Allen Martin <amartin@nvidia.com>

Indeed, NAK. Please fix iomux.c, see the comment on how serial_assign() is 
(mis)used there. Thanks!

> ---
>  drivers/serial/serial.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
> index e0886d5..f1c55bf 100644
> --- a/drivers/serial/serial.c
> +++ b/drivers/serial/serial.c
> @@ -268,7 +268,7 @@ int serial_assign(const char *name)
>  		return 0;
>  	}
> 
> -	return -EINVAL;
> +	return 1;
>  }
> 
>  /**

Best regards,
Marek Vasut

Patch

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index e0886d5..f1c55bf 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -268,7 +268,7 @@  int serial_assign(const char *name)
 		return 0;
 	}
 
-	return -EINVAL;
+	return 1;
 }
 
 /**