mmc: host: sdhci-s3c: Use devm_gpio_request to request GPIOs
authorTomasz Figa <t.figa@samsung.com>
Sun, 25 Nov 2012 20:40:44 +0000 (15:40 -0500)
committerChris Ball <cjb@laptop.org>
Thu, 6 Dec 2012 18:55:00 +0000 (13:55 -0500)
commitb1b8fea94f4c71b5503b7e29974635121f44b302
tree080558048b5ea99f1efbfe4368387440ea30d673
parent3cf38833c7fc72b4f4757fc5d0b4cd43ac192e55
mmc: host: sdhci-s3c: Use devm_gpio_request to request GPIOs

The set of GPIO pins used by sdhci-s3c driver varies between
configurations, such as card detect method, pinctrl availability, etc.
This overly complicates the code requesting and freeing GPIO pins, which
must check which pins are used, when freeing them.

This patch modifies the sdhci-s3c driver to use devm_gpio_request to
free requested pins automatically after unbinding the driver.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-s3c.c