* [PATCH] irqchip/gic-pm: Update driver to use of_pm_clk_add_clk
@ 2016-08-16 10:14 Jon Hunter
2016-08-17 9:59 ` Marc Zyngier
0 siblings, 1 reply; 3+ messages in thread
From: Jon Hunter @ 2016-08-16 10:14 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Marc Zyngier; +Cc: linux-kernel, Jon Hunter
Commit 498b5fdd40dd ("PM / clk: Add support for adding a specific clock
from device-tree") add a new helper function for adding a clock from
device-tree to a device. Update the GIC-PM driver to use this new
function to simplify the driver.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/irqchip/irq-gic-pm.c | 23 +++++------------------
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/drivers/irqchip/irq-gic-pm.c b/drivers/irqchip/irq-gic-pm.c
index 4cbffba3ff13..ecafd295c31c 100644
--- a/drivers/irqchip/irq-gic-pm.c
+++ b/drivers/irqchip/irq-gic-pm.c
@@ -64,7 +64,6 @@ static int gic_runtime_suspend(struct device *dev)
static int gic_get_clocks(struct device *dev, const struct gic_clk_data *data)
{
- struct clk *clk;
unsigned int i;
int ret;
@@ -76,28 +75,16 @@ static int gic_get_clocks(struct device *dev, const struct gic_clk_data *data)
return ret;
for (i = 0; i < data->num_clocks; i++) {
- clk = of_clk_get_by_name(dev->of_node, data->clocks[i]);
- if (IS_ERR(clk)) {
- dev_err(dev, "failed to get clock %s\n",
- data->clocks[i]);
- ret = PTR_ERR(clk);
- goto error;
- }
-
- ret = pm_clk_add_clk(dev, clk);
+ ret = of_pm_clk_add_clk(dev, data->clocks[i]);
if (ret) {
- dev_err(dev, "failed to add clock at index %d\n", i);
- clk_put(clk);
- goto error;
+ dev_err(dev, "failed to add clock %s\n",
+ data->clocks[i]);
+ pm_clk_destroy(dev);
+ return ret;
}
}
return 0;
-
-error:
- pm_clk_destroy(dev);
-
- return ret;
}
static int gic_probe(struct platform_device *pdev)
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip/gic-pm: Update driver to use of_pm_clk_add_clk
2016-08-16 10:14 [PATCH] irqchip/gic-pm: Update driver to use of_pm_clk_add_clk Jon Hunter
@ 2016-08-17 9:59 ` Marc Zyngier
2016-08-17 10:30 ` Jon Hunter
0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2016-08-17 9:59 UTC (permalink / raw)
To: Jon Hunter, Thomas Gleixner, Jason Cooper; +Cc: linux-kernel
Hi Jon,
On 16/08/16 11:14, Jon Hunter wrote:
> Commit 498b5fdd40dd ("PM / clk: Add support for adding a specific clock
> from device-tree") add a new helper function for adding a clock from
> device-tree to a device. Update the GIC-PM driver to use this new
> function to simplify the driver.
>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Looks good to me. Is that something you intended to be part of 4.8?
Thanks,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip/gic-pm: Update driver to use of_pm_clk_add_clk
2016-08-17 9:59 ` Marc Zyngier
@ 2016-08-17 10:30 ` Jon Hunter
0 siblings, 0 replies; 3+ messages in thread
From: Jon Hunter @ 2016-08-17 10:30 UTC (permalink / raw)
To: Marc Zyngier, Thomas Gleixner, Jason Cooper; +Cc: linux-kernel
Hi Marc,
On 17/08/16 10:59, Marc Zyngier wrote:
> Hi Jon,
>
> On 16/08/16 11:14, Jon Hunter wrote:
>> Commit 498b5fdd40dd ("PM / clk: Add support for adding a specific clock
>> from device-tree") add a new helper function for adding a clock from
>> device-tree to a device. Update the GIC-PM driver to use this new
>> function to simplify the driver.
>>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>
> Looks good to me. Is that something you intended to be part of 4.8?
This is fine for v4.9. I was not intending for v4.8 to avoid any merge
conflicts.
Cheers
Jon
--
nvpublic
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-17 10:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16 10:14 [PATCH] irqchip/gic-pm: Update driver to use of_pm_clk_add_clk Jon Hunter
2016-08-17 9:59 ` Marc Zyngier
2016-08-17 10:30 ` Jon Hunter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.