diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-03-15 05:17:54 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-03-27 11:05:14 -0400 |
commit | 493294d4a82470c44bf7ac9b21b901fb3e56dc3b (patch) | |
tree | 3b6ee80c0b77dd25afd7487a3f4f133e1c82d39f /drivers/gpio | |
parent | 6c0cf42be3f8e1039d3f31c2e8e16b4d375527c7 (diff) |
gpio: mc33880: use spi_get_drvdata() and spi_set_drvdata()
Use the wrapper functions for getting and setting the driver data
using spi_device instead of using dev_{get|set}_drvdata with
&spi->dev, so we can directly pass a struct spi_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-mc33880.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-mc33880.c b/drivers/gpio/gpio-mc33880.c index 33958799bd3d..63a7a1bfb2d9 100644 --- a/drivers/gpio/gpio-mc33880.c +++ b/drivers/gpio/gpio-mc33880.c | |||
@@ -107,7 +107,7 @@ static int mc33880_probe(struct spi_device *spi) | |||
107 | 107 | ||
108 | mutex_init(&mc->lock); | 108 | mutex_init(&mc->lock); |
109 | 109 | ||
110 | dev_set_drvdata(&spi->dev, mc); | 110 | spi_set_drvdata(spi, mc); |
111 | 111 | ||
112 | mc->spi = spi; | 112 | mc->spi = spi; |
113 | 113 | ||
@@ -142,7 +142,7 @@ static int mc33880_probe(struct spi_device *spi) | |||
142 | return ret; | 142 | return ret; |
143 | 143 | ||
144 | exit_destroy: | 144 | exit_destroy: |
145 | dev_set_drvdata(&spi->dev, NULL); | 145 | spi_set_drvdata(spi, NULL); |
146 | mutex_destroy(&mc->lock); | 146 | mutex_destroy(&mc->lock); |
147 | return ret; | 147 | return ret; |
148 | } | 148 | } |
@@ -152,11 +152,11 @@ static int mc33880_remove(struct spi_device *spi) | |||
152 | struct mc33880 *mc; | 152 | struct mc33880 *mc; |
153 | int ret; | 153 | int ret; |
154 | 154 | ||
155 | mc = dev_get_drvdata(&spi->dev); | 155 | mc = spi_get_drvdata(spi); |
156 | if (mc == NULL) | 156 | if (mc == NULL) |
157 | return -ENODEV; | 157 | return -ENODEV; |
158 | 158 | ||
159 | dev_set_drvdata(&spi->dev, NULL); | 159 | spi_set_drvdata(spi, NULL); |
160 | 160 | ||
161 | ret = gpiochip_remove(&mc->chip); | 161 | ret = gpiochip_remove(&mc->chip); |
162 | if (!ret) | 162 | if (!ret) |