mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-28 04:03:23 -04:00
mailbox: rockchip: drop unneeded runtime pointer (pclk)
The pclk pointer is only used in rockchip_mbox_probe() and is not needed after probe completes. Make it a local variable and drop it from struct rockchip_mbox, which saves a little bit of runtime memory. Signed-off-by: Linmao Li <lilinmao@kylinos.cn> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
This commit is contained in:
@@ -40,7 +40,6 @@ struct rockchip_mbox_chan {
|
||||
|
||||
struct rockchip_mbox {
|
||||
struct mbox_controller mbox;
|
||||
struct clk *pclk;
|
||||
void __iomem *mbox_base;
|
||||
|
||||
/* The maximum size of buf for each channel */
|
||||
@@ -166,6 +165,7 @@ static int rockchip_mbox_probe(struct platform_device *pdev)
|
||||
struct rockchip_mbox *mb;
|
||||
const struct rockchip_mbox_data *drv_data;
|
||||
struct resource *res;
|
||||
struct clk *pclk;
|
||||
int ret, irq, i;
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
@@ -196,9 +196,9 @@ static int rockchip_mbox_probe(struct platform_device *pdev)
|
||||
/* Each channel has two buffers for A2B and B2A */
|
||||
mb->buf_size = (size_t)resource_size(res) / (drv_data->num_chans * 2);
|
||||
|
||||
mb->pclk = devm_clk_get_enabled(&pdev->dev, "pclk_mailbox");
|
||||
if (IS_ERR(mb->pclk))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(mb->pclk),
|
||||
pclk = devm_clk_get_enabled(&pdev->dev, "pclk_mailbox");
|
||||
if (IS_ERR(pclk))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(pclk),
|
||||
"failed to get and enable pclk_mailbox clock\n");
|
||||
|
||||
for (i = 0; i < mb->mbox.num_chans; i++) {
|
||||
|
||||
Reference in New Issue
Block a user