staging: mt7621-gpio: fix masks for gpio pin
BIT macro is being used to get mask for gpio's pin which is retrieved using 'hwirq' from struct irq_data. The problem here is that 'hwirq' can be as large as 95, and 1UL << 95 is unlikely to work well. Instead of using BIT macro use a new PIN_MASK macro which takes into account pin and WIDTH of the bank in order to make a proper mask for the gpio pin. Also 'd->hwirq' has been replaced by 'pin' in some places because there was a 'pin' variable in changed functions with the proper value. This improves readability. Signed-off-by: NSergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NNeilBrown <neil@brown.name> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录