state->close_delay = new_serial.close_delay * HZ / 100; state->closing_wait = new_serial.closing_wait * HZ / 100; 
state->close_delay = msecs_to_jiffies(10 * new_serial.close_delay); state->closing_wait = msecs_to_jiffies(10 * new_serial.closing_wait); 
static int set_serial_info(struct SICC_info *info,               struct serial_struct *newinfo){    struct serial_struct new_serial;    struct SICC_state *state, old_state;    struct SICC_port *port;    unsigned long new_port;    unsigned int i, change_irq, change_port;    int retval = 0;    if (copy_from_user(&new_serial, newinfo, sizeof(new_serial)))        return -EFAULT;    state = info->state;    old_state = *state;    port = info->port;    new_port = new_serial.port;    if (HIGH_BITS_OFFSET)        new_port += (unsigned long) new_serial.port_high << HIGH_BITS_OFFSET;    change_irq  = new_serial.irq != port->irqrx;    change_port = new_port != port->uart_base;    if (!capable(CAP_SYS_ADMIN)) {        if (change_irq || change_port ||            (new_serial.baud_base != port->uartclk / 16) ||            (new_serial.close_delay != state->close_delay) ||            (new_serial.xmit_fifo_size != port->fifosize) ||            ((new_serial.flags & ~ASYNC_USR_MASK) !=             (state->flags & ~ASYNC_USR_MASK)))            return -EPERM;        state->flags = ((state->flags & ~ASYNC_USR_MASK) |                (new_serial.flags & ASYNC_USR_MASK));        info->flags = ((info->flags & ~ASYNC_USR_MASK) |                   (new_serial.flags & ASYNC_USR_MASK));        state->custom_divisor = new_serial.custom_divisor;        goto check_and_exit;    }    if ((new_serial.irq >= NR_IRQS) || (new_serial.irq < 0) ||        (new_serial.baud_base < 9600))        return -EINVAL;    if (new_serial.type && change_port) {        for (i = 0; i < SERIAL_SICC_NR; i++)            if ((port != sicc_ports + i) &&                sicc_ports[i].uart_base != new_port)                return -EADDRINUSE;    }    if ((change_port || change_irq) && (state->count > 1))        return -EBUSY;    /*     * OK, past this point, all the error checking has been done.     * At this point, we start making changes.....     */    port->uartclk = new_serial.baud_base * 16;    state->flags = ((state->flags & ~ASYNC_FLAGS) |            (new_serial.flags & ASYNC_FLAGS));    info->flags = ((state->flags & ~ASYNC_INTERNAL_FLAGS) |               (info->flags & ASYNC_INTERNAL_FLAGS));    state->custom_divisor = new_serial.custom_divisor;    state->close_delay = new_serial.close_delay * HZ / 100;    state->closing_wait = new_serial.closing_wait * HZ / 100;    info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;    port->fifosize = new_serial.xmit_fifo_size;    if (change_port || change_irq) {        /*         * We need to shutdown the serial port at the old         * port/irq combination.         */        siccuart_shutdown(info);        port->irqrx = new_serial.irq;        port->uart_base = new_port;    }check_and_exit:    if (!port->uart_base)        return 0;    if (info->flags & ASYNC_INITIALIZED) {        if ((old_state.flags & ASYNC_SPD_MASK) !=            (state->flags & ASYNC_SPD_MASK) ||            (old_state.custom_divisor != state->custom_divisor)) {            if ((state->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)                info->tty->alt_speed = 57600;            if ((state->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)                info->tty->alt_speed = 115200;            if ((state->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)                info->tty->alt_speed = 230400;            if ((state->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)                info->tty->alt_speed = 460800;            siccuart_change_speed(info, NULL);        }    } else        retval = siccuart_startup(info);    return retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8f09f4a25a927080e1fa1331735c3d1b5664866b/serial_sicc.c/buggy/arch/ppc/4xx_io/serial_sicc.c