Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+16 -26
+16 -26
arch/m32r/platforms/opsput/setup.c
··· 227 227 outw(data, port); 228 228 } 229 229 230 - static void mask_and_ack_opsput_lcdpld(unsigned int irq) 230 + static void mask_opsput_lcdpld(struct irq_data *data) 231 231 { 232 - disable_opsput_lcdpld_irq(irq); 232 + disable_opsput_lcdpld_irq(data->irq); 233 233 } 234 234 235 - static void end_opsput_lcdpld_irq(unsigned int irq) 235 + static void unmask_opsput_lcdpld(struct irq_data *data) 236 236 { 237 - enable_opsput_lcdpld_irq(irq); 237 + enable_opsput_lcdpld_irq(data->irq); 238 238 enable_opsput_irq(M32R_IRQ_INT2); 239 239 } 240 240 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) 248 242 { 249 243 unsigned long port; 250 244 unsigned int pldirq; 251 245 252 - pldirq = irq2lcdpldirq(irq); 246 + pldirq = irq2lcdpldirq(data->irq); 253 247 port = lcdpldirq2port(pldirq); 254 248 outw(PLD_ICUCR_ILEVEL7, port); 255 249 } 256 250 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, 266 256 }; 267 257 268 258 void __init init_IRQ(void) ··· 348 358 enable_opsput_irq(M32R_IRQ_INT1); 349 359 350 360 #if defined(CONFIG_USB) 351 - outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ 352 - 353 - set_irq_chip(OPSPUT_LCD_IRQ_USB_INT1, &opsput_lcdpld_irq_type); 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); 361 + outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ 362 + set_irq_chip_and_handler(OPSPUT_LCD_IRQ_USB_INT1, 363 + &opsput_lcdpld_irq_type, handle_level_irq); 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); 356 366 #endif 357 367 /* 358 368 * INT2# is used for BAT, USB, AUDIO