]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
gpio: max7301: fix the race between chip addition and pins reconfiguration
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Thu, 16 Oct 2008 05:03:11 +0000 (22:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Oct 2008 18:21:40 +0000 (11:21 -0700)
commitc557fa3e4c156b8713c177d9dde08920130bf551
treea79b6e702b0d76ba79c2204af527a0c193a68253
parent4fd5463c43d75ec919e27abdcfde1b199c19541e
gpio: max7301: fix the race between chip addition and pins reconfiguration

There is a small race and code ugliness in max7301: pins are reconfigured
after the chip is registered.  Swap these calls so that the device is
registered in correct state.

Also this fixes the comile-time warning about unchecked gpiochip_remove.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Juergen Beisert <j.beisert@pengutronix.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/gpio/max7301.c