--- zzzz-none-000/linux-3.10.107/drivers/spi/spi-mpc52xx-psc.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/spi/spi-mpc52xx-psc.c 2021-02-04 17:41:59.000000000 +0000 @@ -12,7 +12,6 @@ */ #include -#include #include #include #include @@ -248,7 +247,8 @@ } m->status = status; - m->complete(m->context); + if (m->complete) + m->complete(m->context); if (status || !cs_change) mpc52xx_psc_spi_deactivate_cs(spi); @@ -366,7 +366,7 @@ static int mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr, u32 size, unsigned int irq, s16 bus_num) { - struct fsl_spi_platform_data *pdata = dev->platform_data; + struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); struct mpc52xx_psc_spi *mps; struct spi_master *master; int ret; @@ -383,8 +383,8 @@ mps->irq = irq; if (pdata == NULL) { - dev_warn(dev, "probe called without platform data, no " - "cs_control function will be called\n"); + dev_warn(dev, + "probe called without platform data, no cs_control function will be called\n"); mps->cs_control = NULL; mps->sysclk = 0; master->bus_num = bus_num; @@ -481,7 +481,7 @@ static int mpc52xx_psc_spi_of_remove(struct platform_device *op) { - struct spi_master *master = spi_master_get(dev_get_drvdata(&op->dev)); + struct spi_master *master = spi_master_get(platform_get_drvdata(op)); struct mpc52xx_psc_spi *mps = spi_master_get_devdata(master); flush_workqueue(mps->workqueue); @@ -508,7 +508,6 @@ .remove = mpc52xx_psc_spi_of_remove, .driver = { .name = "mpc52xx-psc-spi", - .owner = THIS_MODULE, .of_match_table = mpc52xx_psc_spi_of_match, }, };