]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
memory: renesas-rpc-if: Split-off private data from struct rpcif
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 23 Nov 2022 14:41:17 +0000 (15:41 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 14 Mar 2023 15:47:46 +0000 (16:47 +0100)
commit0d23c61a0003d39b887e9e9cc97e98f67cc22d1a
tree4ee7ad768a9f8167c9e2e1262762bf56a9b8d977
parent92a65282c2611dc7166202dc58b60a9cf34d8c89
memory: renesas-rpc-if: Split-off private data from struct rpcif

BugLink: https://bugs.launchpad.net/bugs/2011430
[ Upstream commit 51de3fc9a84d8e99dd3f02536a623f9fb95d0c0a ]

The rpcif structure is used as a common data structure, shared by the
RPC-IF core driver and by the HyperBus and SPI child drivers.
This poses several problems:
  - Most structure members describe private core driver state, which
    should not be accessible by the child drivers,
  - The structure's lifetime is controlled by the child drivers,
    complicating use by the core driver.

Fix this by moving the private core driver state to its own structure,
managed by the RPC-IF core driver, and store it in the core driver's
private data field.  This requires absorbing the child's platform
device, as that was stored in the driver's private data field before.

Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/09fbb6fa67d5a8cd48a08808c9afa2f6a499aa42.1669213027.git.geert+renesas@glider.be
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/memory/renesas-rpc-if.c
include/memory/renesas-rpc-if.h