This is a note to let you know that I've just added the patch titled

    spi/mpc83xx: fix NULL pdata dereference bug

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     spi-mpc83xx-fix-null-pdata-dereference-bug.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 5039a86973cd35bdb2f64d28ee12f13fe2bb5a4c Mon Sep 17 00:00:00 2001
From: Kenth Eriksson <[email protected]>
Date: Fri, 30 Mar 2012 17:05:30 +0200
Subject: spi/mpc83xx: fix NULL pdata dereference bug

From: Kenth Eriksson <[email protected]>

commit 5039a86973cd35bdb2f64d28ee12f13fe2bb5a4c upstream.

Commit 178db7d3, "spi: Fix device unregistration when unregistering
the bus master", changed device initialization to be children of the
bus master, not children of the bus masters parent device. The pdata
pointer used in fsl_spi_chipselect must updated to reflect the changed
initialization.

Signed-off-by: Kenth Eriksson <[email protected]>
Acked-by: Joakim Tjernlund <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
Cc: Alfredo Capella <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/spi/spi_fsl_spi.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/spi/spi_fsl_spi.c
+++ b/drivers/spi/spi_fsl_spi.c
@@ -139,10 +139,12 @@ static void fsl_spi_change_mode(struct s
 static void fsl_spi_chipselect(struct spi_device *spi, int value)
 {
        struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master);
-       struct fsl_spi_platform_data *pdata = spi->dev.parent->platform_data;
+       struct fsl_spi_platform_data *pdata;
        bool pol = spi->mode & SPI_CS_HIGH;
        struct spi_mpc8xxx_cs   *cs = spi->controller_state;
 
+       pdata = spi->dev.parent->parent->platform_data;
+
        if (value == BITBANG_CS_INACTIVE) {
                if (pdata->cs_control)
                        pdata->cs_control(spi, !pol);


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.0/spi-mpc83xx-fix-null-pdata-dereference-bug.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to