[PATCH 2/6] arm/imx: remove the uses of gpio_to_irq()

Shawn Guo shawn.guo at freescale.com
Fri Aug 12 04:22:12 EDT 2011


On Fri, Aug 12, 2011 at 09:00:00AM +0100, Russell King - ARM Linux wrote:
> On Fri, Aug 12, 2011 at 03:54:57PM +0800, Shawn Guo wrote:
> > gpio_to_irq() is too generic to be defined and used by i.mx platform
> > code.  The patch defines IMX_GPIO_TO_IRQ() in mach/hardware.h and
> > replaces all the uses of gpio_to_irq() with IMX_GPIO_TO_IRQ().
> 
> That makes no sense.  Why not continue to use gpio_to_irq() but provide
> the .to_irq method in your gpiolib driver so it can work, and use that
> in the places where its used at runtime?
> 
I did provide .to_irq in patch #3. 

> (You won't be able to use it for static initialization obviously.)
> 
All users of gpio_to_irq() in platform codes are static initialization.
And IMX_GPIO_TO_IRQ() is actually a renaming of gpio_to_irq().  Only
difference there is naming and place change, which I think is good, no?

-- 
Regards,
Shawn




More information about the linux-arm-kernel mailing list