idx = pdev->id; 
idx = dev->id; 
mpc52xx_uart_probe(struct platform_device *dev){	struct resource *res = dev->resource;	struct uart_port *port = NULL;	int i, idx, ret;	/* Check validity & presence */	idx = pdev->id;	if (idx < 0 || idx >= MPC52xx_PSC_MAXNUM)		return -EINVAL;	if (!mpc52xx_match_psc_function(idx,"uart"))		return -ENODEV;	/* Init the port structure */	port = &mpc52xx_uart_ports[idx];	memset(port, 0x00, sizeof(struct uart_port));	spin_lock_init(&port->lock);	port->uartclk	= __res.bi_ipbfreq / 2; /* Look at CTLR doc */	port->fifosize	= 255; /* Should be 512 ! But it can't be */	                       /* stored in a unsigned char       */	port->iotype	= UPIO_MEM;	port->flags	= UPF_BOOT_AUTOCONF |			  ( uart_console(port) ? 0 : UPF_IOREMAP );	port->line	= idx;	port->ops	= &mpc52xx_uart_ops;	/* Search for IRQ and mapbase */	for (i=0 ; i<pdev->num_resources ; i++, res++) {		if (res->flags & IORESOURCE_MEM)			port->mapbase = res->start;		else if (res->flags & IORESOURCE_IRQ)			port->irq = res->start;	}	if (!port->irq || !port->mapbase)		return -EINVAL;	/* Add the port to the uart sub-system */	ret = uart_add_one_port(&mpc52xx_uart_driver, port);	if (!ret)		platform_set_drvdata(dev, (void*)port);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/38801e2e54308ec52fc580c0fcdee98fe8696195/mpc52xx_uart.c/buggy/drivers/serial/mpc52xx_uart.c