lkml.org 
[lkml]   [2012]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] ACPI: Move device resources interpretation code from PNP to ACPI core
On Mon, Nov 12, 2012 at 01:00:26PM +0100, Rafael J. Wysocki wrote:
> +/**
> + * acpi_dev_irq_flags - Determine IRQ resource flags.
> + * @triggering: Triggering type as provided by ACPI.
> + * @polarity: Interrupt polarity as provided by ACPI.
> + * @shareable: Whether or not the interrupt is shareable.
> + */
> +unsigned long acpi_dev_irq_flags(u8 triggering, u8 polarity, u8 shareable)
> +{
> + unsigned long flags = IORESOURCE_IRQ;
> +
> + if (triggering == ACPI_LEVEL_SENSITIVE)
> + flags = polarity == ACPI_ACTIVE_LOW ?
> + IORESOURCE_IRQ_LOWLEVEL : IORESOURCE_IRQ_HIGHLEVEL;

This wants to have '|=' instead of '='.

> + else
> + flags = polarity == ACPI_ACTIVE_LOW ?
> + IORESOURCE_IRQ_LOWEDGE : IORESOURCE_IRQ_HIGHEDGE;

Ditto.

> +
> + if (shareable == ACPI_SHARED)
> + flags |= IORESOURCE_IRQ_SHAREABLE;
> +
> + return flags;
> +}
> +EXPORT_SYMBOL_GPL(acpi_dev_irq_flags);


\
 
 \ /
  Last update: 2012-11-12 15:01    [W:2.041 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site