aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpio/max732x.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/gpio/max732x.c b/drivers/gpio/max732x.c
index 9cad60f9e962..9e1d01f0071a 100644
--- a/drivers/gpio/max732x.c
+++ b/drivers/gpio/max732x.c
@@ -327,40 +327,40 @@ static int max732x_gpio_to_irq(struct gpio_chip *gc, unsigned off)
327 return chip->irq_base + off; 327 return chip->irq_base + off;
328} 328}
329 329
330static void max732x_irq_mask(unsigned int irq) 330static void max732x_irq_mask(struct irq_data *d)
331{ 331{
332 struct max732x_chip *chip = get_irq_chip_data(irq); 332 struct max732x_chip *chip = irq_data_get_irq_chip_data(d);
333 333
334 chip->irq_mask_cur &= ~(1 << (irq - chip->irq_base)); 334 chip->irq_mask_cur &= ~(1 << (d->irq - chip->irq_base));
335} 335}
336 336
337static void max732x_irq_unmask(unsigned int irq) 337static void max732x_irq_unmask(struct irq_data *d)
338{ 338{
339 struct max732x_chip *chip = get_irq_chip_data(irq); 339 struct max732x_chip *chip = irq_data_get_irq_chip_data(d);
340 340
341 chip->irq_mask_cur |= 1 << (irq - chip->irq_base); 341 chip->irq_mask_cur |= 1 << (d->irq - chip->irq_base);
342} 342}
343 343
344static void max732x_irq_bus_lock(unsigned int irq) 344static void max732x_irq_bus_lock(struct irq_data *d)
345{ 345{
346 struct max732x_chip *chip = get_irq_chip_data(irq); 346 struct max732x_chip *chip = irq_data_get_irq_chip_data(d);
347 347
348 mutex_lock(&chip->irq_lock); 348 mutex_lock(&chip->irq_lock);
349 chip->irq_mask_cur = chip->irq_mask; 349 chip->irq_mask_cur = chip->irq_mask;
350} 350}
351 351
352static void max732x_irq_bus_sync_unlock(unsigned int irq) 352static void max732x_irq_bus_sync_unlock(struct irq_data *d)
353{ 353{
354 struct max732x_chip *chip = get_irq_chip_data(irq); 354 struct max732x_chip *chip = irq_data_get_irq_chip_data(d);
355 355
356 max732x_irq_update_mask(chip); 356 max732x_irq_update_mask(chip);
357 mutex_unlock(&chip->irq_lock); 357 mutex_unlock(&chip->irq_lock);
358} 358}
359 359
360static int max732x_irq_set_type(unsigned int irq, unsigned int type) 360static int max732x_irq_set_type(struct irq_data *d, unsigned int type)
361{ 361{
362 struct max732x_chip *chip = get_irq_chip_data(irq); 362 struct max732x_chip *chip = irq_data_get_irq_chip_data(d);
363 uint16_t off = irq - chip->irq_base; 363 uint16_t off = d->irq - chip->irq_base;
364 uint16_t mask = 1 << off; 364 uint16_t mask = 1 << off;
365 365
366 if (!(mask & chip->dir_input)) { 366 if (!(mask & chip->dir_input)) {
@@ -371,7 +371,7 @@ static int max732x_irq_set_type(unsigned int irq, unsigned int type)
371 371
372 if (!(type & IRQ_TYPE_EDGE_BOTH)) { 372 if (!(type & IRQ_TYPE_EDGE_BOTH)) {
373 dev_err(&chip->client->dev, "irq %d: unsupported type %d\n", 373 dev_err(&chip->client->dev, "irq %d: unsupported type %d\n",
374 irq, type); 374 d->irq, type);
375 return -EINVAL; 375 return -EINVAL;
376 } 376 }
377 377
@@ -390,11 +390,11 @@ static int max732x_irq_set_type(unsigned int irq, unsigned int type)
390 390
391static struct irq_chip max732x_irq_chip = { 391static struct irq_chip max732x_irq_chip = {
392 .name = "max732x", 392 .name = "max732x",
393 .mask = max732x_irq_mask, 393 .irq_mask = max732x_irq_mask,
394 .unmask = max732x_irq_unmask, 394 .irq_unmask = max732x_irq_unmask,
395 .bus_lock = max732x_irq_bus_lock, 395 .irq_bus_lock = max732x_irq_bus_lock,
396 .bus_sync_unlock = max732x_irq_bus_sync_unlock, 396 .irq_bus_sync_unlock = max732x_irq_bus_sync_unlock,
397 .set_type = max732x_irq_set_type, 397 .irq_set_type = max732x_irq_set_type,
398}; 398};
399 399
400static uint8_t max732x_irq_pending(struct max732x_chip *chip) 400static uint8_t max732x_irq_pending(struct max732x_chip *chip)