]> git.baikalelectronics.ru Git - kernel.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:17 +0000 (13:55 +0100)
commit1b54058e58f2cea5c99e9bc7dfb731c878d57ba9
tree4852bd7be4488bd888136bd09c29270107782110
parentf8b85e71c45ffb22affbe5b878974cc91f24a598
memory: renesas-rpc-if: Split-off private data from struct rpcif

[ Upstream commit 8419f6cd77712d500bd1b94ded722359e5eab2a9 ]

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: 29f245a42766 ("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