|
@@ -420,7 +420,6 @@ static int dspi_suspend(struct device *dev)
|
|
|
|
|
|
static int dspi_resume(struct device *dev)
|
|
|
{
|
|
|
-
|
|
|
struct spi_master *master = dev_get_drvdata(dev);
|
|
|
struct fsl_dspi *dspi = spi_master_get_devdata(master);
|
|
|
|
|
@@ -504,7 +503,7 @@ static int dspi_probe(struct platform_device *pdev)
|
|
|
clk_prepare_enable(dspi->clk);
|
|
|
|
|
|
init_waitqueue_head(&dspi->waitq);
|
|
|
- platform_set_drvdata(pdev, dspi);
|
|
|
+ platform_set_drvdata(pdev, master);
|
|
|
|
|
|
ret = spi_bitbang_start(&dspi->bitbang);
|
|
|
if (ret != 0) {
|
|
@@ -525,7 +524,8 @@ out_master_put:
|
|
|
|
|
|
static int dspi_remove(struct platform_device *pdev)
|
|
|
{
|
|
|
- struct fsl_dspi *dspi = platform_get_drvdata(pdev);
|
|
|
+ struct spi_master *master = platform_get_drvdata(pdev);
|
|
|
+ struct fsl_dspi *dspi = spi_master_get_devdata(master);
|
|
|
|
|
|
/* Disconnect from the SPI framework */
|
|
|
spi_bitbang_stop(&dspi->bitbang);
|