Re: Set_up irq problem while using gpio

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: sasa sasa <sasak.1983@...>
Cc: <linux-kernel@...>
Date: Tuesday, July 15, 2008 - 8:32 am

On Tue, Jul 15, 2008 at 11:34:23AM +0530, sasa sasa wrote:

this is difficult to read, a better way would be to

	ret = desc->chip->set_type(irq, new->flags & IRQF_TRIGGER_MASK)
	if (ret) {
		spin_unlock_irqrestore(&desc->lock, flags);
		return ret;
	}


If set_type() is meant to return an error, this should have been done
from the start, instead of being ignored.

tbh, the code could be further cleaned up by holding 
the (new->flags & IRQF_TRIGGER_MASK in a variable such as new_trigger
which would stop the problem of wrapping lines...


Hmm, I thought (when implementing the s3c24xx irq support) that
requesting the IRQ should change the pin mode appropriately.

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Set_up irq problem while using gpio, sasa sasa, (Tue Jul 15, 2:04 am)
Re: Set_up irq problem while using gpio, Ben Dooks, (Tue Jul 15, 8:32 am)
Re: Set_up irq problem while using gpio, sasa sasa, (Wed Jul 16, 12:08 am)
[BUG]Set_up irq problem while using gpio, sasa sasa, (Thu Jul 17, 5:20 am)