[PATCH] powerpc: Fix crash introduced with commit 5657933dbb6e

From: Larry Finger
Date: Thu Mar 09 2017 - 17:06:21 EST


Code inserted during the git merges before kernel 4.11-rc1 caused an
early panic quickly followed by a complete shutdown. The traceback was
not displayed long enough to read or photograph.

The problem was bisected to commit 5657933dbb6e ("treewide: Move dma_ops
from struct dev_archdata into struct device"). The problem was a missing
copy of critical information from struct dev_archdata into struct device,
leading to the dereference of a null pointer.

Fixes: commit 5657933dbb6e ("treewide: Move dma_ops from struct dev_archdata into struct device")
Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
---
drivers/macintosh/macio_asic.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 3f041b1..f757cef2 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -392,6 +392,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
* To get all the fields, copy all archdata
*/
dev->ofdev.dev.archdata = chip->lbus.pdev->dev.archdata;
+ dev->ofdev.dev.dma_ops = chip->lbus.pdev->dev.dma_ops;
#endif /* CONFIG_PCI */

#ifdef DEBUG
--
2.10.2


--------------9AA996529E7C6DD7EFB133F9--