Skip to content

Commit

Permalink
mfd: Cleanup irq namespace
Browse files Browse the repository at this point in the history
Converted with coccinelle.

Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
KAGA-KOKO authored and Samuel Ortiz committed Mar 26, 2011
1 parent c22435a commit d5bb122
Show file tree
Hide file tree
Showing 21 changed files with 131 additions and 131 deletions.
8 changes: 4 additions & 4 deletions drivers/mfd/88pm860x-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,14 @@ static int __devinit device_irq_init(struct pm860x_chip *chip,
/* register IRQ by genirq */
for (i = 0; i < ARRAY_SIZE(pm860x_irqs); i++) {
__irq = i + chip->irq_base;
set_irq_chip_data(__irq, chip);
set_irq_chip_and_handler(__irq, &pm860x_irq_chip,
irq_set_chip_data(__irq, chip);
irq_set_chip_and_handler(__irq, &pm860x_irq_chip,
handle_edge_irq);
set_irq_nested_thread(__irq, 1);
irq_set_nested_thread(__irq, 1);
#ifdef CONFIG_ARM
set_irq_flags(__irq, IRQF_VALID);
#else
set_irq_noprobe(__irq);
irq_set_noprobe(__irq);
#endif
}

Expand Down
12 changes: 6 additions & 6 deletions drivers/mfd/ab3550-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ static int ab3550_startup_irq_enabled(struct device *dev, unsigned int irq)
struct ab3550_platform_data *plf_data;
bool val;

ab = get_irq_chip_data(irq);
ab = irq_get_chip_data(irq);
plf_data = ab->i2c_client[0]->dev.platform_data;
irq -= plf_data->irq.base;
val = ((ab->startup_events[irq / 8] & BIT(irq % 8)) != 0);
Expand Down Expand Up @@ -1296,14 +1296,14 @@ static int __init ab3550_probe(struct i2c_client *client,
unsigned int irq;

irq = ab3550_plf_data->irq.base + i;
set_irq_chip_data(irq, ab);
set_irq_chip_and_handler(irq, &ab3550_irq_chip,
handle_simple_irq);
set_irq_nested_thread(irq, 1);
irq_set_chip_data(irq, ab);
irq_set_chip_and_handler(irq, &ab3550_irq_chip,
handle_simple_irq);
irq_set_nested_thread(irq, 1);
#ifdef CONFIG_ARM
set_irq_flags(irq, IRQF_VALID);
#else
set_irq_noprobe(irq);
irq_set_noprobe(irq);
#endif
}

Expand Down
12 changes: 6 additions & 6 deletions drivers/mfd/ab8500-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,14 @@ static int ab8500_irq_init(struct ab8500 *ab8500)
int irq;

for (irq = base; irq < base + AB8500_NR_IRQS; irq++) {
set_irq_chip_data(irq, ab8500);
set_irq_chip_and_handler(irq, &ab8500_irq_chip,
irq_set_chip_data(irq, ab8500);
irq_set_chip_and_handler(irq, &ab8500_irq_chip,
handle_simple_irq);
set_irq_nested_thread(irq, 1);
irq_set_nested_thread(irq, 1);
#ifdef CONFIG_ARM
set_irq_flags(irq, IRQF_VALID);
#else
set_irq_noprobe(irq);
irq_set_noprobe(irq);
#endif
}

Expand All @@ -357,8 +357,8 @@ static void ab8500_irq_remove(struct ab8500 *ab8500)
#ifdef CONFIG_ARM
set_irq_flags(irq, 0);
#endif
set_irq_chip_and_handler(irq, NULL, NULL);
set_irq_chip_data(irq, NULL);
irq_set_chip_and_handler(irq, NULL, NULL);
irq_set_chip_data(irq, NULL);
}
}

Expand Down
22 changes: 11 additions & 11 deletions drivers/mfd/asic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,21 +388,21 @@ static int __init asic3_irq_probe(struct platform_device *pdev)

for (irq = irq_base; irq < irq_base + ASIC3_NR_IRQS; irq++) {
if (irq < asic->irq_base + ASIC3_NUM_GPIOS)
set_irq_chip(irq, &asic3_gpio_irq_chip);
irq_set_chip(irq, &asic3_gpio_irq_chip);
else
set_irq_chip(irq, &asic3_irq_chip);
irq_set_chip(irq, &asic3_irq_chip);

set_irq_chip_data(irq, asic);
set_irq_handler(irq, handle_level_irq);
irq_set_chip_data(irq, asic);
irq_set_handler(irq, handle_level_irq);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}

asic3_write_register(asic, ASIC3_OFFSET(INTR, INT_MASK),
ASIC3_INTMASK_GINTMASK);

set_irq_chained_handler(asic->irq_nr, asic3_irq_demux);
set_irq_type(asic->irq_nr, IRQ_TYPE_EDGE_RISING);
set_irq_data(asic->irq_nr, asic);
irq_set_chained_handler(asic->irq_nr, asic3_irq_demux);
irq_set_irq_type(asic->irq_nr, IRQ_TYPE_EDGE_RISING);
irq_set_handler_data(asic->irq_nr, asic);

return 0;
}
Expand All @@ -416,11 +416,11 @@ static void asic3_irq_remove(struct platform_device *pdev)

for (irq = irq_base; irq < irq_base + ASIC3_NR_IRQS; irq++) {
set_irq_flags(irq, 0);
set_irq_handler(irq, NULL);
set_irq_chip(irq, NULL);
set_irq_chip_data(irq, NULL);
irq_set_handler(irq, NULL);
irq_set_chip(irq, NULL);
irq_set_chip_data(irq, NULL);
}
set_irq_chained_handler(asic->irq_nr, NULL);
irq_set_chained_handler(asic->irq_nr, NULL);
}

/* GPIOs */
Expand Down
20 changes: 10 additions & 10 deletions drivers/mfd/ezx-pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static void pcap_isr_work(struct work_struct *work)

static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc)
{
struct pcap_chip *pcap = get_irq_data(irq);
struct pcap_chip *pcap = irq_get_handler_data(irq);

desc->irq_data.chip->irq_ack(&desc->irq_data);
queue_work(pcap->workqueue, &pcap->isr_work);
Expand Down Expand Up @@ -411,7 +411,7 @@ static int __devexit ezx_pcap_remove(struct spi_device *spi)

/* cleanup irqchip */
for (i = pcap->irq_base; i < (pcap->irq_base + PCAP_NIRQS); i++)
set_irq_chip_and_handler(i, NULL, NULL);
irq_set_chip_and_handler(i, NULL, NULL);

destroy_workqueue(pcap->workqueue);

Expand Down Expand Up @@ -468,12 +468,12 @@ static int __devinit ezx_pcap_probe(struct spi_device *spi)

/* setup irq chip */
for (i = pcap->irq_base; i < (pcap->irq_base + PCAP_NIRQS); i++) {
set_irq_chip_and_handler(i, &pcap_irq_chip, handle_simple_irq);
set_irq_chip_data(i, pcap);
irq_set_chip_and_handler(i, &pcap_irq_chip, handle_simple_irq);
irq_set_chip_data(i, pcap);
#ifdef CONFIG_ARM
set_irq_flags(i, IRQF_VALID);
#else
set_irq_noprobe(i);
irq_set_noprobe(i);
#endif
}

Expand All @@ -482,10 +482,10 @@ static int __devinit ezx_pcap_probe(struct spi_device *spi)
ezx_pcap_write(pcap, PCAP_REG_ISR, PCAP_CLEAR_INTERRUPT_REGISTER);
pcap->msr = PCAP_MASK_ALL_INTERRUPT;

set_irq_type(spi->irq, IRQ_TYPE_EDGE_RISING);
set_irq_data(spi->irq, pcap);
set_irq_chained_handler(spi->irq, pcap_irq_handler);
set_irq_wake(spi->irq, 1);
irq_set_irq_type(spi->irq, IRQ_TYPE_EDGE_RISING);
irq_set_handler_data(spi->irq, pcap);
irq_set_chained_handler(spi->irq, pcap_irq_handler);
irq_set_irq_wake(spi->irq, 1);

/* ADC */
adc_irq = pcap_to_irq(pcap, (pdata->config & PCAP_SECOND_PORT) ?
Expand Down Expand Up @@ -514,7 +514,7 @@ static int __devinit ezx_pcap_probe(struct spi_device *spi)
free_irq(adc_irq, pcap);
free_irqchip:
for (i = pcap->irq_base; i < (pcap->irq_base + PCAP_NIRQS); i++)
set_irq_chip_and_handler(i, NULL, NULL);
irq_set_chip_and_handler(i, NULL, NULL);
/* destroy_workqueue: */
destroy_workqueue(pcap->workqueue);
free_pcap:
Expand Down
18 changes: 9 additions & 9 deletions drivers/mfd/htc-egpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,14 @@ static int __init egpio_probe(struct platform_device *pdev)
ei->ack_write = 0;
irq_end = ei->irq_start + ei->nirqs;
for (irq = ei->irq_start; irq < irq_end; irq++) {
set_irq_chip(irq, &egpio_muxed_chip);
set_irq_chip_data(irq, ei);
set_irq_handler(irq, handle_simple_irq);
irq_set_chip(irq, &egpio_muxed_chip);
irq_set_chip_data(irq, ei);
irq_set_handler(irq, handle_simple_irq);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}
set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING);
set_irq_data(ei->chained_irq, ei);
set_irq_chained_handler(ei->chained_irq, egpio_handler);
irq_set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING);
irq_set_handler_data(ei->chained_irq, ei);
irq_set_chained_handler(ei->chained_irq, egpio_handler);
ack_irqs(ei);

device_init_wakeup(&pdev->dev, 1);
Expand All @@ -373,11 +373,11 @@ static int __exit egpio_remove(struct platform_device *pdev)
if (ei->chained_irq) {
irq_end = ei->irq_start + ei->nirqs;
for (irq = ei->irq_start; irq < irq_end; irq++) {
set_irq_chip(irq, NULL);
set_irq_handler(irq, NULL);
irq_set_chip(irq, NULL);
irq_set_handler(irq, NULL);
set_irq_flags(irq, 0);
}
set_irq_chained_handler(ei->chained_irq, NULL);
irq_set_chained_handler(ei->chained_irq, NULL);
device_init_wakeup(&pdev->dev, 0);
}
iounmap(ei->base_addr);
Expand Down
8 changes: 4 additions & 4 deletions drivers/mfd/htc-i2cpld.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,13 @@ static int __devinit htcpld_setup_chip_irq(
/* Setup irq handlers */
irq_end = chip->irq_start + chip->nirqs;
for (irq = chip->irq_start; irq < irq_end; irq++) {
set_irq_chip(irq, &htcpld_muxed_chip);
set_irq_chip_data(irq, chip);
set_irq_handler(irq, handle_simple_irq);
irq_set_chip(irq, &htcpld_muxed_chip);
irq_set_chip_data(irq, chip);
irq_set_handler(irq, handle_simple_irq);
#ifdef CONFIG_ARM
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
#else
set_irq_probe(irq);
irq_set_probe(irq);
#endif
}

Expand Down
16 changes: 8 additions & 8 deletions drivers/mfd/jz4740-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static struct irq_chip jz4740_adc_irq_chip = {

static void jz4740_adc_irq_demux(unsigned int irq, struct irq_desc *desc)
{
struct jz4740_adc *adc = get_irq_desc_data(desc);
struct jz4740_adc *adc = irq_desc_get_handler_data(desc);
uint8_t status;
unsigned int i;

Expand Down Expand Up @@ -310,13 +310,13 @@ static int __devinit jz4740_adc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, adc);

for (irq = adc->irq_base; irq < adc->irq_base + 5; ++irq) {
set_irq_chip_data(irq, adc);
set_irq_chip_and_handler(irq, &jz4740_adc_irq_chip,
handle_level_irq);
irq_set_chip_data(irq, adc);
irq_set_chip_and_handler(irq, &jz4740_adc_irq_chip,
handle_level_irq);
}

set_irq_data(adc->irq, adc);
set_irq_chained_handler(adc->irq, jz4740_adc_irq_demux);
irq_set_handler_data(adc->irq, adc);
irq_set_chained_handler(adc->irq, jz4740_adc_irq_demux);

writeb(0x00, adc->base + JZ_REG_ADC_ENABLE);
writeb(0xff, adc->base + JZ_REG_ADC_CTRL);
Expand Down Expand Up @@ -347,8 +347,8 @@ static int __devexit jz4740_adc_remove(struct platform_device *pdev)

mfd_remove_devices(&pdev->dev);

set_irq_data(adc->irq, NULL);
set_irq_chained_handler(adc->irq, NULL);
irq_set_handler_data(adc->irq, NULL);
irq_set_chained_handler(adc->irq, NULL);

iounmap(adc->base);
release_mem_region(adc->mem->start, resource_size(adc->mem));
Expand Down
8 changes: 4 additions & 4 deletions drivers/mfd/max8925-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,14 +547,14 @@ static int max8925_irq_init(struct max8925_chip *chip, int irq,
/* register with genirq */
for (i = 0; i < ARRAY_SIZE(max8925_irqs); i++) {
__irq = i + chip->irq_base;
set_irq_chip_data(__irq, chip);
set_irq_chip_and_handler(__irq, &max8925_irq_chip,
irq_set_chip_data(__irq, chip);
irq_set_chip_and_handler(__irq, &max8925_irq_chip,
handle_edge_irq);
set_irq_nested_thread(__irq, 1);
irq_set_nested_thread(__irq, 1);
#ifdef CONFIG_ARM
set_irq_flags(__irq, IRQF_VALID);
#else
set_irq_noprobe(__irq);
irq_set_noprobe(__irq);
#endif
}
if (!irq) {
Expand Down
8 changes: 4 additions & 4 deletions drivers/mfd/max8998-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ int max8998_irq_init(struct max8998_dev *max8998)
/* register with genirq */
for (i = 0; i < MAX8998_IRQ_NR; i++) {
cur_irq = i + max8998->irq_base;
set_irq_chip_data(cur_irq, max8998);
set_irq_chip_and_handler(cur_irq, &max8998_irq_chip,
irq_set_chip_data(cur_irq, max8998);
irq_set_chip_and_handler(cur_irq, &max8998_irq_chip,
handle_edge_irq);
set_irq_nested_thread(cur_irq, 1);
irq_set_nested_thread(cur_irq, 1);
#ifdef CONFIG_ARM
set_irq_flags(cur_irq, IRQF_VALID);
#else
set_irq_noprobe(cur_irq);
irq_set_noprobe(cur_irq);
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/mfd/max8998.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static int max8998_suspend(struct device *dev)
struct max8998_dev *max8998 = i2c_get_clientdata(i2c);

if (max8998->wakeup)
set_irq_wake(max8998->irq, 1);
irq_set_irq_wake(max8998->irq, 1);
return 0;
}

Expand All @@ -219,7 +219,7 @@ static int max8998_resume(struct device *dev)
struct max8998_dev *max8998 = i2c_get_clientdata(i2c);

if (max8998->wakeup)
set_irq_wake(max8998->irq, 0);
irq_set_irq_wake(max8998->irq, 0);
/*
* In LP3974, if IRQ registers are not "read & clear"
* when it's set during sleep, the interrupt becomes
Expand Down
12 changes: 6 additions & 6 deletions drivers/mfd/stmpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,14 +762,14 @@ static int __devinit stmpe_irq_init(struct stmpe *stmpe)
int irq;

for (irq = base; irq < base + num_irqs; irq++) {
set_irq_chip_data(irq, stmpe);
set_irq_chip_and_handler(irq, &stmpe_irq_chip,
irq_set_chip_data(irq, stmpe);
irq_set_chip_and_handler(irq, &stmpe_irq_chip,
handle_edge_irq);
set_irq_nested_thread(irq, 1);
irq_set_nested_thread(irq, 1);
#ifdef CONFIG_ARM
set_irq_flags(irq, IRQF_VALID);
#else
set_irq_noprobe(irq);
irq_set_noprobe(irq);
#endif
}

Expand All @@ -786,8 +786,8 @@ static void stmpe_irq_remove(struct stmpe *stmpe)
#ifdef CONFIG_ARM
set_irq_flags(irq, 0);
#endif
set_irq_chip_and_handler(irq, NULL, NULL);
set_irq_chip_data(irq, NULL);
irq_set_chip_and_handler(irq, NULL, NULL);
irq_set_chip_data(irq, NULL);
}
}

Expand Down
Loading

0 comments on commit d5bb122

Please sign in to comment.