Re: [PATCH] of_path: only handle no driver for device if it is on a bus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 12, 2017 at 12:20:05PM +0000, Ian Abbott wrote:
> This fixes a regression in __of_find_path() for flash devices created by
> the cadence-quadspi driver, which do not have 'dev->driver' set.  Such
> devices do not have 'dev->bus' set either, so we can use that to qualify
> the existing test.
> 
> Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
> ---
>  drivers/of/of_path.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
> index 946b9c7aa..e0b2dc124 100644
> --- a/drivers/of/of_path.c
> +++ b/drivers/of/of_path.c
> @@ -66,7 +66,7 @@ static int __of_find_path(struct device_node *node, const char *part, char **out
>  			return -ENODEV;
>  	}
>  
> -	if (!dev->driver)
> +	if (dev->bus && !dev->driver)
>  		return -ENODEV;

I am not entirely happy with this patch. Let's hope it won't fall on our
feet later. Applied for now, let's see.

Sascha


-- 
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 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux