lkml.org 
[lkml]   [2012]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ 046/167] [PATCH] spi: Fix device unregistration when unregistering the bus master
On Wed, May 09, 2012 at 06:51:15AM +0100, Ben Hutchings wrote:
> 3.2-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> commit 178db7d30f94707efca1a189753c105ef69942ed upstream.

After applying this change, this introduces a bug on spi-fsl-spi.c, we
need to apply in addition to this change commit
5039a86973cd35bdb2f64d28ee12f13fe2bb5a4c

>
> Device are added as children of the bus master's parent device, but
> spi_unregister_master() looks for devices to unregister in the bus
> master's children. This results in the child devices not being
> unregistered.
>
> Fix this by registering devices as direct children of the bus master.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> drivers/spi/spi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 77eae99..b2ccdea 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -319,7 +319,7 @@ struct spi_device *spi_alloc_device(struct spi_master *master)
> }
>
> spi->master = master;
> - spi->dev.parent = dev;
> + spi->dev.parent = &master->dev;
> spi->dev.bus = &spi_bus_type;
> spi->dev.release = spidev_release;
> device_initialize(&spi->dev);
> --
> 1.7.10
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>


\
 
 \ /
  Last update: 2012-05-09 22:01    [W:0.915 / U:1.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site