aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/gpio.c')
-rw-r--r--arch/arm/mach-omap2/gpio.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index 2765cdc3152d..8cbfbc2918ce 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -24,17 +24,9 @@
24#include <plat/omap_hwmod.h> 24#include <plat/omap_hwmod.h>
25#include <plat/omap_device.h> 25#include <plat/omap_device.h>
26 26
27static struct omap_device_pm_latency omap_gpio_latency[] = {
28 [0] = {
29 .deactivate_func = omap_device_idle_hwmods,
30 .activate_func = omap_device_enable_hwmods,
31 .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
32 },
33};
34
35static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) 27static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
36{ 28{
37 struct omap_device *od; 29 struct platform_device *pdev;
38 struct omap_gpio_platform_data *pdata; 30 struct omap_gpio_platform_data *pdata;
39 struct omap_gpio_dev_attr *dev_attr; 31 struct omap_gpio_dev_attr *dev_attr;
40 char *name = "omap_gpio"; 32 char *name = "omap_gpio";
@@ -107,19 +99,17 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
107 return -EINVAL; 99 return -EINVAL;
108 } 100 }
109 101
110 od = omap_device_build(name, id - 1, oh, pdata, 102 pdev = omap_device_build(name, id - 1, oh, pdata,
111 sizeof(*pdata), omap_gpio_latency, 103 sizeof(*pdata), NULL, 0, false);
112 ARRAY_SIZE(omap_gpio_latency),
113 false);
114 kfree(pdata); 104 kfree(pdata);
115 105
116 if (IS_ERR(od)) { 106 if (IS_ERR(pdev)) {
117 WARN(1, "Can't build omap_device for %s:%s.\n", 107 WARN(1, "Can't build omap_device for %s:%s.\n",
118 name, oh->name); 108 name, oh->name);
119 return PTR_ERR(od); 109 return PTR_ERR(pdev);
120 } 110 }
121 111
122 omap_device_disable_idle_on_suspend(od); 112 omap_device_disable_idle_on_suspend(pdev);
123 113
124 gpio_bank_count++; 114 gpio_bank_count++;
125 return 0; 115 return 0;