mwavedd.c (2d8ad8719591fa803b0d589ed057fa46f49b7155) | mwavedd.c (ce7240e445303de3ca66e6d08f17a2ec278a5bf6) |
---|---|
1/* 2* 3* mwavedd.c -- mwave device driver 4* 5* 6* Written By: Mike Sullivan IBM Corporation 7* 8* Copyright (C) 1999 IBM Corporation --- 416 unchanged lines hidden (view full) --- 425 file, buf, count, ppos); 426 427 return -EINVAL; 428} 429 430 431static int register_serial_portandirq(unsigned int port, int irq) 432{ | 1/* 2* 3* mwavedd.c -- mwave device driver 4* 5* 6* Written By: Mike Sullivan IBM Corporation 7* 8* Copyright (C) 1999 IBM Corporation --- 416 unchanged lines hidden (view full) --- 425 file, buf, count, ppos); 426 427 return -EINVAL; 428} 429 430 431static int register_serial_portandirq(unsigned int port, int irq) 432{ |
433 struct uart_port uart; | 433 struct uart_8250_port uart; |
434 435 switch ( port ) { 436 case 0x3f8: 437 case 0x2f8: 438 case 0x3e8: 439 case 0x2e8: 440 /* OK */ 441 break; --- 15 unchanged lines hidden (view full) --- 457 default: 458 PRINTK_ERROR(KERN_ERR_MWAVE 459 "mwavedd::register_serial_portandirq:" 460 " Error: Illegal irq %x\n", irq ); 461 return -1; 462 } /* switch */ 463 /* irq is okay */ 464 | 434 435 switch ( port ) { 436 case 0x3f8: 437 case 0x2f8: 438 case 0x3e8: 439 case 0x2e8: 440 /* OK */ 441 break; --- 15 unchanged lines hidden (view full) --- 457 default: 458 PRINTK_ERROR(KERN_ERR_MWAVE 459 "mwavedd::register_serial_portandirq:" 460 " Error: Illegal irq %x\n", irq ); 461 return -1; 462 } /* switch */ 463 /* irq is okay */ 464 |
465 memset(&uart, 0, sizeof(struct uart_port)); | 465 memset(&uart, 0, sizeof(uart)); |
466 | 466 |
467 uart.uartclk = 1843200; 468 uart.iobase = port; 469 uart.irq = irq; 470 uart.iotype = UPIO_PORT; 471 uart.flags = UPF_SHARE_IRQ; 472 return serial8250_register_port(&uart); | 467 uart.port.uartclk = 1843200; 468 uart.port.iobase = port; 469 uart.port.irq = irq; 470 uart.port.iotype = UPIO_PORT; 471 uart.port.flags = UPF_SHARE_IRQ; 472 return serial8250_register_8250_port(&uart); |
473} 474 475 476static const struct file_operations mwave_fops = { 477 .owner = THIS_MODULE, 478 .read = mwave_read, 479 .write = mwave_write, 480 .unlocked_ioctl = mwave_ioctl, --- 217 unchanged lines hidden --- | 473} 474 475 476static const struct file_operations mwave_fops = { 477 .owner = THIS_MODULE, 478 .read = mwave_read, 479 .write = mwave_write, 480 .unlocked_ioctl = mwave_ioctl, --- 217 unchanged lines hidden --- |