From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [PATCH] spi/spi-fsl-spi: reference correct pdata in fsl_spi_cs_control Date: Sat, 19 May 2012 23:12:16 -0600 Message-ID: <20120520051216.AAAD73E03B8@localhost> References: <1336775390-24128-1-git-send-email-herton.krzesinski@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Ben Hutchings , Laurent Pinchart , Kenth Eriksson , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Joakim Tjernlund , "Herton R. Krzesinski" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Sun, 13 May 2012 11:22:25 +0200, Joakim Tjernlund wrote: > "Herton R. Krzesinski" wrote on 2012/05/12 00:29:50: > > > > From: Herton Ronaldo Krzesinski > > > > Commit 178db7d3, "spi: Fix device unregistration when unregistering > > the bus master", changed spi device initialization of dev.parent pointer > > to be the master's device pointer instead of his parent. > > > > This introduced a bug in spi-fsl-spi, since its usage of spi device > > pointer was not updated accordingly. This was later fixed by commit > > 5039a86, "spi/mpc83xx: fix NULL pdata dereference bug", but it missed > > another spot on fsl_spi_cs_control function where we also need to update > > usage of spi device pointer. This change address that. > > > > Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > > Signed-off-by: Herton Ronaldo Krzesinski > > --- > > drivers/spi/spi-fsl-spi.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c > > index 5f748c0..6a62934 100644 > > --- a/drivers/spi/spi-fsl-spi.c > > +++ b/drivers/spi/spi-fsl-spi.c > > @@ -933,7 +933,7 @@ err: > > > > static void fsl_spi_cs_control(struct spi_device *spi, bool on) > > { > > - struct device *dev = spi->dev.parent; > > + struct device *dev = spi->dev.parent->parent; > > struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(dev->platform_data); > > u16 cs = spi->chip_select; > > int gpio = pinfo->gpios[cs]; > > So it seems > Acked-by: Joakim Tjernlund > Applied, thanks. g. -- Grant Likely, B.Sc, P.Eng. Secret Lab Technologies, Ltd. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/