aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2011-01-12 20:00:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 11:03:14 -0500
commit33fcc1b80259a9c09074a3859c26772f3d595c20 (patch)
treeb54dde00e817f19c0efb3dbbff61af3e7641c7fb /drivers
parent673860c107d3adc3fb0c85d7b4c86f551e75dc01 (diff)
gpio: tc35892-gpio: irq_data conversion
Converts irq_chips and flow handlers over to the new struct irq_data based irq_chip functions. Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Acked-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/tc3589x-gpio.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/gpio/tc3589x-gpio.c b/drivers/gpio/tc3589x-gpio.c
index 180d584454fb..27200af1a595 100644
--- a/drivers/gpio/tc3589x-gpio.c
+++ b/drivers/gpio/tc3589x-gpio.c
@@ -110,10 +110,10 @@ static struct gpio_chip template_chip = {
110 .can_sleep = 1, 110 .can_sleep = 1,
111}; 111};
112 112
113static int tc3589x_gpio_irq_set_type(unsigned int irq, unsigned int type) 113static int tc3589x_gpio_irq_set_type(struct irq_data *d, unsigned int type)
114{ 114{
115 struct tc3589x_gpio *tc3589x_gpio = get_irq_chip_data(irq); 115 struct tc3589x_gpio *tc3589x_gpio = irq_data_get_irq_chip_data(d);
116 int offset = irq - tc3589x_gpio->irq_base; 116 int offset = d->irq - tc3589x_gpio->irq_base;
117 int regoffset = offset / 8; 117 int regoffset = offset / 8;
118 int mask = 1 << (offset % 8); 118 int mask = 1 << (offset % 8);
119 119
@@ -137,16 +137,16 @@ static int tc3589x_gpio_irq_set_type(unsigned int irq, unsigned int type)
137 return 0; 137 return 0;
138} 138}
139 139
140static void tc3589x_gpio_irq_lock(unsigned int irq) 140static void tc3589x_gpio_irq_lock(struct irq_data *d)
141{ 141{
142 struct tc3589x_gpio *tc3589x_gpio = get_irq_chip_data(irq); 142 struct tc3589x_gpio *tc3589x_gpio = irq_data_get_irq_chip_data(d);
143 143
144 mutex_lock(&tc3589x_gpio->irq_lock); 144 mutex_lock(&tc3589x_gpio->irq_lock);
145} 145}
146 146
147static void tc3589x_gpio_irq_sync_unlock(unsigned int irq) 147static void tc3589x_gpio_irq_sync_unlock(struct irq_data *d)
148{ 148{
149 struct tc3589x_gpio *tc3589x_gpio = get_irq_chip_data(irq); 149 struct tc3589x_gpio *tc3589x_gpio = irq_data_get_irq_chip_data(d);
150 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; 150 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
151 static const u8 regmap[] = { 151 static const u8 regmap[] = {
152 [REG_IBE] = TC3589x_GPIOIBE0, 152 [REG_IBE] = TC3589x_GPIOIBE0,
@@ -172,20 +172,20 @@ static void tc3589x_gpio_irq_sync_unlock(unsigned int irq)
172 mutex_unlock(&tc3589x_gpio->irq_lock); 172 mutex_unlock(&tc3589x_gpio->irq_lock);
173} 173}
174 174
175static void tc3589x_gpio_irq_mask(unsigned int irq) 175static void tc3589x_gpio_irq_mask(struct irq_data *d)
176{ 176{
177 struct tc3589x_gpio *tc3589x_gpio = get_irq_chip_data(irq); 177 struct tc3589x_gpio *tc3589x_gpio = irq_data_get_irq_chip_data(d);
178 int offset = irq - tc3589x_gpio->irq_base; 178 int offset = d->irq - tc3589x_gpio->irq_base;
179 int regoffset = offset / 8; 179 int regoffset = offset / 8;
180 int mask = 1 << (offset % 8); 180 int mask = 1 << (offset % 8);
181 181
182 tc3589x_gpio->regs[REG_IE][regoffset] &= ~mask; 182 tc3589x_gpio->regs[REG_IE][regoffset] &= ~mask;
183} 183}
184 184
185static void tc3589x_gpio_irq_unmask(unsigned int irq) 185static void tc3589x_gpio_irq_unmask(struct irq_data *d)
186{ 186{
187 struct tc3589x_gpio *tc3589x_gpio = get_irq_chip_data(irq); 187 struct tc3589x_gpio *tc3589x_gpio = irq_data_get_irq_chip_data(d);
188 int offset = irq - tc3589x_gpio->irq_base; 188 int offset = d->irq - tc3589x_gpio->irq_base;
189 int regoffset = offset / 8; 189 int regoffset = offset / 8;
190 int mask = 1 << (offset % 8); 190 int mask = 1 << (offset % 8);
191 191
@@ -194,11 +194,11 @@ static void tc3589x_gpio_irq_unmask(unsigned int irq)
194 194
195static struct irq_chip tc3589x_gpio_irq_chip = { 195static struct irq_chip tc3589x_gpio_irq_chip = {
196 .name = "tc3589x-gpio", 196 .name = "tc3589x-gpio",
197 .bus_lock = tc3589x_gpio_irq_lock, 197 .irq_bus_lock = tc3589x_gpio_irq_lock,
198 .bus_sync_unlock = tc3589x_gpio_irq_sync_unlock, 198 .irq_bus_sync_unlock = tc3589x_gpio_irq_sync_unlock,
199 .mask = tc3589x_gpio_irq_mask, 199 .irq_mask = tc3589x_gpio_irq_mask,
200 .unmask = tc3589x_gpio_irq_unmask, 200 .irq_unmask = tc3589x_gpio_irq_unmask,
201 .set_type = tc3589x_gpio_irq_set_type, 201 .irq_set_type = tc3589x_gpio_irq_set_type,
202}; 202};
203 203
204static irqreturn_t tc3589x_gpio_irq(int irq, void *dev) 204static irqreturn_t tc3589x_gpio_irq(int irq, void *dev)