Re: [PATCH 1/2] genirq: add function to get IRQ edge/level flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/12/2013 11:56 PM, Stephen Warren wrote:
> On 04/12/2013 12:05 PM, Javier Martinez Canillas wrote:
> ...
>> So, is better to add an irq_get_trigger_type() function to obtain
>> the edge/level flags for an IRQ.
> 
>> diff --git a/include/linux/irq.h b/include/linux/irq.h
> 
>> +static inline u32 irq_get_trigger_type(unsigned int irq)
>> +{
>> +	struct irq_data *d = irq_get_irq_data(irq);
>> +	return d ? d->state_use_accessors & IRQD_TRIGGER_MASK : 0;
> 
> Should the direct access to d->state_use_accessors be replaced with a
> call to irqd_get_trigger_type()? Perhaps since this is inside the IRQ
> code header, there's no need to use the accessor function?
> 

Yes, it's better to use irqd_get_trigger_type() instead of a direct access to
d->state_use_accessors since that function is inline so it should be the same
performance wise and it will be easier to maintain.

I'll send a v2 changing that.

Thanks a lot and best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux