Skip to content

Commit 9b141fa

Browse files
committed
m32r: Convert opsput_lcdpld irq chip
Convert the irq chips to the new functions and use proper flow handlers. handle_level_irq is appropriate. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Paul Mundt <lethal@linux-sh.org>
1 parent 1899a49 commit 9b141fa

1 file changed

Lines changed: 16 additions & 26 deletions

File tree

‎arch/m32r/platforms/opsput/setup.c‎

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -227,42 +227,32 @@ static void enable_opsput_lcdpld_irq(unsigned int irq)
227227
outw(data, port);
228228
}
229229

230-
static void mask_and_ack_opsput_lcdpld(unsigned int irq)
230+
static void mask_opsput_lcdpld(struct irq_data *data)
231231
{
232-
disable_opsput_lcdpld_irq(irq);
232+
disable_opsput_lcdpld_irq(data->irq);
233233
}
234234

235-
static void end_opsput_lcdpld_irq(unsigned int irq)
235+
static void unmask_opsput_lcdpld(struct irq_data *data)
236236
{
237-
enable_opsput_lcdpld_irq(irq);
237+
enable_opsput_lcdpld_irq(data->irq);
238238
enable_opsput_irq(M32R_IRQ_INT2);
239239
}
240240

241-
static unsigned int startup_opsput_lcdpld_irq(unsigned int irq)
242-
{
243-
enable_opsput_lcdpld_irq(irq);
244-
return (0);
245-
}
246-
247-
static void shutdown_opsput_lcdpld_irq(unsigned int irq)
241+
static void shutdown_opsput_lcdpld(struct irq_data *data)
248242
{
249243
unsigned long port;
250244
unsigned int pldirq;
251245

252-
pldirq = irq2lcdpldirq(irq);
246+
pldirq = irq2lcdpldirq(data->irq);
253247
port = lcdpldirq2port(pldirq);
254248
outw(PLD_ICUCR_ILEVEL7, port);
255249
}
256250

257-
static struct irq_chip opsput_lcdpld_irq_type =
258-
{
259-
"OPSPUT-PLD-LCD-IRQ",
260-
startup_opsput_lcdpld_irq,
261-
shutdown_opsput_lcdpld_irq,
262-
enable_opsput_lcdpld_irq,
263-
disable_opsput_lcdpld_irq,
264-
mask_and_ack_opsput_lcdpld,
265-
end_opsput_lcdpld_irq
251+
static struct irq_chip opsput_lcdpld_irq_type = {
252+
.name = "OPSPUT-PLD-LCD-IRQ",
253+
.irq_shutdown = shutdown_opsput_lcdpld,
254+
.irq_mask = mask_opsput_lcdpld,
255+
.irq_unmask = unmask_opsput_lcdpld,
266256
};
267257

268258
void __init init_IRQ(void)
@@ -358,11 +348,11 @@ void __init init_IRQ(void)
358348
enable_opsput_irq(M32R_IRQ_INT1);
359349

360350
#if defined(CONFIG_USB)
361-
outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
362-
363-
set_irq_chip(OPSPUT_LCD_IRQ_USB_INT1, &opsput_lcdpld_irq_type);
364-
lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
365-
disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1);
351+
outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
352+
set_irq_chip_and_handler(OPSPUT_LCD_IRQ_USB_INT1,
353+
&opsput_lcdpld_irq_type, handle_level_irq);
354+
lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
355+
disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1);
366356
#endif
367357
/*
368358
* INT2# is used for BAT, USB, AUDIO

0 commit comments

Comments
 (0)