mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
clk: nuvoton: ma35d1: Keep the clock count in the driver
The number of clocks is not a binding since this is a value that can change. As such, in order to support the missing watchdog clocks and allow the deprecation and removal of CLK_MAX_IDX from the bindings, we need to switch to a local definition first. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20260930-perso-ma35d1-upstream-clk-v6-1-48937ee6c9bb@bootlin.com Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
602aba4a39
commit
26ec588063
|
|
@ -17,6 +17,7 @@
|
|||
static DEFINE_SPINLOCK(ma35d1_lock);
|
||||
|
||||
#define PLL_MAX_NUM 5
|
||||
#define MA35D1_CLK_COUNT 236
|
||||
|
||||
/* Clock Control Registers Offset */
|
||||
#define REG_CLK_PWRCTL 0x00
|
||||
|
|
@ -467,12 +468,12 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
|
|||
int ret;
|
||||
|
||||
ma35d1_hw_data = devm_kzalloc(dev,
|
||||
struct_size(ma35d1_hw_data, hws, CLK_MAX_IDX),
|
||||
struct_size(ma35d1_hw_data, hws, MA35D1_CLK_COUNT),
|
||||
GFP_KERNEL);
|
||||
if (!ma35d1_hw_data)
|
||||
return -ENOMEM;
|
||||
|
||||
ma35d1_hw_data->num = CLK_MAX_IDX;
|
||||
ma35d1_hw_data->num = MA35D1_CLK_COUNT;
|
||||
hws = ma35d1_hw_data->hws;
|
||||
|
||||
clk_base = devm_platform_ioremap_resource(pdev, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user