mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
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:
@@ -473,11 +473,15 @@ static int spi_engine_probe(struct platform_device *pdev)
|
|||||||
if (irq <= 0)
|
if (irq <= 0)
|
||||||
return -ENXIO;
|
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)
|
if (!host)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
spi_engine = spi_controller_get_devdata(host);
|
spi_controller_set_devdata(host, spi_engine);
|
||||||
|
|
||||||
spin_lock_init(&spi_engine->lock);
|
spin_lock_init(&spi_engine->lock);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user