diff options
Diffstat (limited to 'drivers/leds/leds-fsg.c')
-rw-r--r-- | drivers/leds/leds-fsg.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/leds/leds-fsg.c b/drivers/leds/leds-fsg.c index b9053fa6e253..b4d5a44cc41b 100644 --- a/drivers/leds/leds-fsg.c +++ b/drivers/leds/leds-fsg.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/leds.h> | 21 | #include <linux/leds.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/io.h> | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <asm/io.h> | ||
25 | 25 | ||
26 | #define FSG_LED_WLAN_BIT 0 | 26 | #define FSG_LED_WLAN_BIT 0 |
27 | #define FSG_LED_WAN_BIT 1 | 27 | #define FSG_LED_WAN_BIT 1 |
@@ -149,11 +149,10 @@ static int fsg_led_probe(struct platform_device *pdev) | |||
149 | int ret; | 149 | int ret; |
150 | 150 | ||
151 | /* Map the LED chip select address space */ | 151 | /* Map the LED chip select address space */ |
152 | latch_address = (unsigned short *) ioremap(IXP4XX_EXP_BUS_BASE(2), 512); | 152 | latch_address = (unsigned short *) devm_ioremap(&pdev->dev, |
153 | if (!latch_address) { | 153 | IXP4XX_EXP_BUS_BASE(2), 512); |
154 | ret = -ENOMEM; | 154 | if (!latch_address) |
155 | goto failremap; | 155 | return -ENOMEM; |
156 | } | ||
157 | 156 | ||
158 | latch_value = 0xffff; | 157 | latch_value = 0xffff; |
159 | *latch_address = latch_value; | 158 | *latch_address = latch_value; |
@@ -195,8 +194,6 @@ static int fsg_led_probe(struct platform_device *pdev) | |||
195 | failwan: | 194 | failwan: |
196 | led_classdev_unregister(&fsg_wlan_led); | 195 | led_classdev_unregister(&fsg_wlan_led); |
197 | failwlan: | 196 | failwlan: |
198 | iounmap(latch_address); | ||
199 | failremap: | ||
200 | 197 | ||
201 | return ret; | 198 | return ret; |
202 | } | 199 | } |
@@ -210,8 +207,6 @@ static int fsg_led_remove(struct platform_device *pdev) | |||
210 | led_classdev_unregister(&fsg_sync_led); | 207 | led_classdev_unregister(&fsg_sync_led); |
211 | led_classdev_unregister(&fsg_ring_led); | 208 | led_classdev_unregister(&fsg_ring_led); |
212 | 209 | ||
213 | iounmap(latch_address); | ||
214 | |||
215 | return 0; | 210 | return 0; |
216 | } | 211 | } |
217 | 212 | ||