lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Mar 2015 10:37:48 +0900
From:	Simon Horman <horms@...ge.net.au>
To:	Geert Uytterhoeven <geert+renesas@...der.be>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Jason Cooper <jason@...edaemon.net>,
	Magnus Damm <magnus.damm@...il.com>, linux-sh@...r.kernel.org,
	devicetree@...r.kernel.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] irqchip: renesas-irqc: Add minimal runtime PM support

On Wed, Mar 18, 2015 at 07:55:56PM +0100, Geert Uytterhoeven wrote:
> This is just enough to let pm_clk_*() enable the functional clock, and
> manage it for suspend/resume, if present.
> Before, it was assumed enabled by the bootloader or reset state.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>

Reviewed-by: Simon Horman <horms+renesas@...ge.net.au>

> ---
>  drivers/irqchip/irq-renesas-irqc.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
> index 2ce2edf8ec8ec182..718f01cd1aea19f6 100644
> --- a/drivers/irqchip/irq-renesas-irqc.c
> +++ b/drivers/irqchip/irq-renesas-irqc.c
> @@ -29,6 +29,7 @@
>  #include <linux/slab.h>
>  #include <linux/module.h>
>  #include <linux/platform_data/irq-renesas-irqc.h>
> +#include <linux/pm_runtime.h>
>  
>  #define IRQC_IRQ_MAX	32	/* maximum 32 interrupts per driver instance */
>  
> @@ -180,6 +181,9 @@ static int irqc_probe(struct platform_device *pdev)
>  	p->pdev = pdev;
>  	platform_set_drvdata(pdev, p);
>  
> +	pm_runtime_enable(&pdev->dev);
> +	pm_runtime_get_sync(&pdev->dev);
> +
>  	/* get hold of manadatory IOMEM */
>  	io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!io) {
> @@ -260,6 +264,8 @@ err3:
>  err2:
>  	iounmap(p->iomem);
>  err1:
> +	pm_runtime_put(&pdev->dev);
> +	pm_runtime_disable(&pdev->dev);
>  	kfree(p);
>  err0:
>  	return ret;
> @@ -275,6 +281,8 @@ static int irqc_remove(struct platform_device *pdev)
>  
>  	irq_domain_remove(p->irq_domain);
>  	iounmap(p->iomem);
> +	pm_runtime_put(&pdev->dev);
> +	pm_runtime_disable(&pdev->dev);
>  	kfree(p);
>  	return 0;
>  }
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ