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]
Message-ID: <CAL_Jsq+JGpNBwS3HF1fF4HdefRCwhniaYCm5G4_WAnio7t-1og@mail.gmail.com>
Date:	Fri, 24 Jul 2015 14:14:57 -0500
From:	Rob Herring <robherring2@...il.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] of/irq: introduce of_has_named_irqs helper

On Fri, Jul 24, 2015 at 1:26 PM, Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
> Sometimes drivers might wish to transition from index-based to named
> interrupt descriptions. To aid in decision-making when parsing device
> tree data let's provide a helper that will indicate the scheme that is
> being used.

Generally, IRQs are retrieved by platform_get_irq or
platform_get_irq_byname. Drivers should not call the of_irq_*
functions directly in most cases.

>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> ---
>
> The intent is to it like this:
>
>         if (of_has_named_irqs(np) {
>                 /* Wake IRQ is optional */
>                 dev->wakeirq = of_irq_get_byname(np, "wakeup");
>                 if (dev->wakeirq < 0 && dev->wakeirq != -ENODATA)
>                         return dev->wakeirq;
>         }

of_irq_get_byname will already return an error if the property is not
present. Use that.

Rob
--
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