diff options
Diffstat (limited to 'drivers/gpio/tc3589x-gpio.c')
-rw-r--r-- | drivers/gpio/tc3589x-gpio.c | 36 |
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 | ||
113 | static int tc3589x_gpio_irq_set_type(unsigned int irq, unsigned int type) | 113 | static 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 | ||
140 | static void tc3589x_gpio_irq_lock(unsigned int irq) | 140 | static 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 | ||
147 | static void tc3589x_gpio_irq_sync_unlock(unsigned int irq) | 147 | static 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 | ||
175 | static void tc3589x_gpio_irq_mask(unsigned int irq) | 175 | static 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 | ||
185 | static void tc3589x_gpio_irq_unmask(unsigned int irq) | 185 | static 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 | ||
195 | static struct irq_chip tc3589x_gpio_irq_chip = { | 195 | static 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 | ||
204 | static irqreturn_t tc3589x_gpio_irq(int irq, void *dev) | 204 | static irqreturn_t tc3589x_gpio_irq(int irq, void *dev) |