aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/spi-qcom-qspi.c
diff options
context:
space:
mode:
authorGravatar Mark Brown <broonie@kernel.org> 2020-01-23 12:37:18 +0000
committerGravatar Mark Brown <broonie@kernel.org> 2020-01-23 12:37:18 +0000
commit754a36a58c29718bf5e28b8789b17bffbb60e8a6 (patch)
treee0772eb7f3248ce030b52774e57f510f85933d58 /drivers/spi/spi-qcom-qspi.c
parentMerge branch 'spi-5.5' into spi-linus (diff)
parentdt-binding: spi: add NPCM PSPI reset binding (diff)
downloadlinux-754a36a58c29718bf5e28b8789b17bffbb60e8a6.tar.gz
linux-754a36a58c29718bf5e28b8789b17bffbb60e8a6.tar.bz2
linux-754a36a58c29718bf5e28b8789b17bffbb60e8a6.zip
Merge branch 'spi-5.6' into spi-next
Diffstat (limited to 'drivers/spi/spi-qcom-qspi.c')
-rw-r--r--drivers/spi/spi-qcom-qspi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom-qspi.c
index 250fd60e1678..3c4f83bf7084 100644
--- a/drivers/spi/spi-qcom-qspi.c
+++ b/drivers/spi/spi-qcom-qspi.c
@@ -137,7 +137,7 @@ enum qspi_clocks {
struct qcom_qspi {
void __iomem *base;
struct device *dev;
- struct clk_bulk_data clks[QSPI_NUM_CLKS];
+ struct clk_bulk_data *clks;
struct qspi_xfer xfer;
/* Lock to protect xfer and IRQ accessed registers */
spinlock_t lock;
@@ -445,6 +445,13 @@ static int qcom_qspi_probe(struct platform_device *pdev)
goto exit_probe_master_put;
}
+ ctrl->clks = devm_kcalloc(dev, QSPI_NUM_CLKS,
+ sizeof(*ctrl->clks), GFP_KERNEL);
+ if (!ctrl->clks) {
+ ret = -ENOMEM;
+ goto exit_probe_master_put;
+ }
+
ctrl->clks[QSPI_CLK_CORE].id = "core";
ctrl->clks[QSPI_CLK_IFACE].id = "iface";
ret = devm_clk_bulk_get(dev, QSPI_NUM_CLKS, ctrl->clks);