|
@@ -139,10 +139,12 @@ static void fsl_spi_change_mode(struct spi_device *spi)
|
|
|
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);
|