summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/cd-gpio.c
AgeCommit message (Collapse)Author
2012-04-24mmc: cd-gpio: protect against NULL context in mmc_cd_gpio_free()Guennadi Liakhovetski
Do not oops, even if mmc_cd_gpio_free() is mistakenly called on a driver cleanup path, even though a previous call to mmc_cd_gpio_request() failed. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> [stable@: please apply to 3.3-stable] Cc: stable <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-21mmc: cd-gpio: Include header to pickup exported symbol prototypesH Hartley Sweeten
Include the linux/mmc/cd-gpio.h header to pickup the prototypes for the two exported symbols. This quiets the sparse warnings: warning: symbol 'mmc_cd_gpio_request' was not declared. Should it be static? warning: symbol 'mmc_cd_gpio_free' was not declared. Should it be static? Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-03-27mmc: simplify mmc_cd_gpio_request() by removing two parametersGuennadi Liakhovetski
Calculate the IRQ number, using gpio_to_irq() and use fixed flags: trigger on both edges. This makes two out of four arguments of the mmc_cd_gpio_request() function redundant. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-01-12mmc: add a generic GPIO card-detect helperGuennadi Liakhovetski
This patch adds a primitive helper to support card hotplug detection on platforms, where a GPIO, capable of producing interrupts, is used for detection of card-insertion and -removal events. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>