Revert "spi: axi-spi-engine: simplify driver data allocation"

This reverts commit be632e909c which is
commit 9e4ce5220eedea2cc440f3961dec1b5122e815b2 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I53033e5988e2e24fee2847555b1c148ef6aea4c1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2024-07-22 10:02:01 +00:00
parent 948d41cbb2
commit b0e59b447d

View File

@@ -473,11 +473,15 @@ static int spi_engine_probe(struct platform_device *pdev)
if (irq <= 0)
return -ENXIO;
host = spi_alloc_host(&pdev->dev, sizeof(*spi_engine));
spi_engine = devm_kzalloc(&pdev->dev, sizeof(*spi_engine), GFP_KERNEL);
if (!spi_engine)
return -ENOMEM;
host = spi_alloc_host(&pdev->dev, 0);
if (!host)
return -ENOMEM;
spi_engine = spi_controller_get_devdata(host);
spi_controller_set_devdata(host, spi_engine);
spin_lock_init(&spi_engine->lock);