From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH V2 07/14] genirq: Add runtime power management support for IRQ chips Date: Wed, 20 Apr 2016 10:11:53 -0700 Message-ID: <7h37qgb3xi.fsf@baylibre.com> References: <1461150237-15580-1-git-send-email-jonathanh@nvidia.com> <1461150237-15580-8-git-send-email-jonathanh@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1461150237-15580-8-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> (Jon Hunter's message of "Wed, 20 Apr 2016 12:03:50 +0100") Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jon Hunter Cc: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Stephen Warren , Thierry Reding , Geert Uytterhoeven , Grygorii Strashko , Lars-Peter Clausen , Linus Walleij , linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org Jon Hunter writes: > Some IRQ chips may be located in a power domain outside of the CPU > subsystem and hence will require device specific runtime power > management. In order to support such IRQ chips, add a pointer for a > device structure to the irq_chip structure, and if this pointer is > populated by the IRQ chip driver and CONFIG_PM is selected in the kernel > configuration, then the pm_runtime_get/put APIs for this chip will be > called when an IRQ is requested/freed, respectively. > > Signed-off-by: Jon Hunter [...] > @@ -1891,10 +1906,18 @@ int setup_percpu_irq(unsigned int irq, struct irqaction *act) > > if (!desc || !irq_settings_is_per_cpu_devid(desc)) > return -EINVAL; > + > + retval = irq_chip_pm_get(&desc->irq_data); > + if (retval < 0) > + return retval; > + > chip_bus_lock(desc); > retval = __setup_irq(irq, desc, act); > chip_bus_sync_unlock(desc); > > + if (retval) > + irq_chip_pm_get(&desc->irq_data); > + Shouldn't this one be a _put() ? Otherwise, LGTM Reviewed-by: Kevin Hilman Kevin -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html