OSDN Git Service

clk: renesas: cpg-mssr: Combine driver-private and clock array allocation
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 12 Jun 2019 15:27:56 +0000 (17:27 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 20 Jun 2019 09:37:00 +0000 (11:37 +0200)
commit8f5e20b6b8848baca6b1cebcd46ab9e94991d24e
tree28b5f89ce6769be4b1d99f0833165e2fd022b03c
parenta79f5836bd5f38673e130e78e8b8a03438e6a030
clk: renesas: cpg-mssr: Combine driver-private and clock array allocation

Make cpg_mssr_priv.clks[] a flexible array member, and use the new
struct_size() helper, to combine the allocation of the driver-private
structure and array of available clocks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
drivers/clk/renesas/renesas-cpg-mssr.c