[PATCH] cramfs: probe(): fix cdev lookup

Sascha Hauer s.hauer at pengutronix.de
Wed Dec 16 02:43:31 EST 2009


On Tue, Dec 15, 2009 at 09:09:05PM +0100, Peter Korsgaard wrote:
> Strip /dev/ part of backing store before passing cdev_by_name, as
> cramfs_probe() will otherwise always fail.
> 
> Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>

Applied, thanks

  Sascha

> ---
>  fs/cramfs/cramfs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
> index d49ac32..73a3759 100644
> --- a/fs/cramfs/cramfs.c
> +++ b/fs/cramfs/cramfs.c
> @@ -431,7 +431,7 @@ static int cramfs_probe(struct device_d *dev)
>  	if (strncmp(fsdev->backingstore, "/dev/", 5))
>  		return -ENODEV;
>  
> -	priv->cdev = cdev_by_name(fsdev->backingstore);
> +	priv->cdev = cdev_by_name(fsdev->backingstore + 5);
>  	if (!priv->cdev)
>  		return -ENODEV;
>  
> -- 
> 1.6.5
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list