Re: [PATCH 2/3] hwmon: (lm90) add support to handle irq

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

 



On Mon, Jul 08, 2013 at 09:46:41AM -0600, Stephen Warren wrote:
> On 07/05/2013 01:47 PM, Guenter Roeck wrote:
> > On Fri, Jul 05, 2013 at 11:35:05AM -0600, Stephen Warren wrote:
> >> On 07/04/2013 01:57 AM, Wei Ni wrote:
> >>> Add support to handle irq. When the temperature touch
> >>> the limit value, the driver can handle the interrupt.
> >>
> >>> +	if (client->irq >= 0) {
> >>
> >> 0 isn't a valid IRQ, so you can write that as simply if (client->irq).
> >>
> > If I recall correctly, it is valid on some platforms.
> 
> I thought ARM (just some ARM sub-architectures?) might have been the
> last architecture, and even irrespective of that, we were trying not to
> introduce any new code that relies on this strangeness, so it doesn't
> propagate?
> 
Sounds good to me. Another problem, though, may be that NO_IRQ is sometimes
defined as -1, sometimes as 0, sometimes as 0xffffffff, and sometimes as INT_MAX.
Which of course is another mess :(.

Guenter



_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux