/* Verify the new serial_struct (for TIOCSSERIAL). The only change we allow are to the flags and type, and even then only between PORT_PNX8XXX and PORT_UNKNOWN  */
static int pnx8xxx_verify_port(struct uart_port *port, struct serial_struct *ser)
/* Verify the new serial_struct (for TIOCSSERIAL). The only change we allow are to the flags and type, and even then only between PORT_PNX8XXX and PORT_UNKNOWN  */
static int pnx8xxx_verify_port(struct uart_port *port, struct serial_struct *ser)
{
	struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port;
	int ret = 0;
	if (ser->type != PORT_UNKNOWN && ser->type != PORT_PNX8XXX)
		ret = -EINVAL;
	if (sport->port.irq != ser->irq)
		ret = -EINVAL;
	if (ser->io_type != SERIAL_IO_MEM)
		ret = -EINVAL;
	if (sport->port.uartclk / 16 != ser->baud_base)
		ret = -EINVAL;
	if ((void *)sport->port.mapbase != ser->iomem_base)
		ret = -EINVAL;
	if (sport->port.iobase != ser->port)
		ret = -EINVAL;
	if (ser->hub6 != 0)
		ret = -EINVAL;
	return ret;
}