From: Linus Torvalds Date: Fri, 7 Jan 2011 22:39:20 +0000 (-0800) Subject: Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 X-Git-Tag: v3.12-rc1~7839 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56b85f32d530d09d6805488ad00775d4e0e3baab;p=kernel%2Fkernel-generic.git Merge branch 'tty-next' of git://git./linux/kernel/git/gregkh/tty-2.6 * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (36 commits) serial: apbuart: Fixup apbuart_console_init() TTY: Add tty ioctl to figure device node of the system console. tty: add 'active' sysfs attribute to tty0 and console device drivers: serial: apbuart: Handle OF failures gracefully Serial: Avoid unbalanced IRQ wake disable during resume tty: fix typos/errors in tty_driver.h comments pch_uart : fix warnings for 64bit compile 8250: fix uninitialized FIFOs ip2: fix compiler warning on ip2main_pci_tbl specialix: fix compiler warning on specialix_pci_tbl rocket: fix compiler warning on rocket_pci_ids 8250: add a UPIO_DWAPB32 for 32 bit accesses 8250: use container_of() instead of casting serial: omap-serial: Add support for kernel debugger serial: fix pch_uart kconfig & build drivers: char: hvc: add arm JTAG DCC console support RS485 documentation: add 16C950 UART description serial: ifx6x60: fix memory leak serial: ifx6x60: free IRQ on error Serial: EG20T: add PCH_UART driver ... Fixed up conflicts in drivers/serial/apbuart.c with evil merge that makes the code look fairly sane (unlike either side). --- 56b85f32d530d09d6805488ad00775d4e0e3baab diff --cc drivers/serial/apbuart.c index 767ce9e,a30bb962..095a5d5 --- a/drivers/serial/apbuart.c +++ b/drivers/serial/apbuart.c @@@ -613,29 -602,26 +605,31 @@@ static int grlib_apbuart_configure(void /* Get bus frequency */ rp = of_find_node_by_path("/"); + if (!rp) + return -ENODEV; rp = of_get_next_child(rp, NULL); + if (!rp) + return -ENODEV; prop = of_get_property(rp, "clock-frequency", NULL); + if (!prop) + return -ENODEV; freq_khz = *prop; - line = 0; for_each_matching_node(np, apbuart_match) { - const int *irqs = of_get_property(np, "interrupts", NULL); ++ const int *irqs, *ampopts; + const struct amba_prom_registers *regs; + struct uart_port *port; + unsigned long addr; - int *vendor = (int *) of_get_property(np, "vendor", NULL); - int *device = (int *) of_get_property(np, "device", NULL); - int *irqs = (int *) of_get_property(np, "interrupts", NULL); - int *ampopts = (int *) of_get_property(np, "ampopts", NULL); - regs = (struct amba_prom_registers *) - of_get_property(np, "reg", NULL); - ++ ampopts = of_get_property(np, "ampopts", NULL); + if (ampopts && (*ampopts == 0)) + continue; /* Ignore if used by another OS instance */ - if (vendor) - v = *vendor; - if (device) - d = *device; ++ ++ irqs = of_get_property(np, "interrupts", NULL); + regs = of_get_property(np, "reg", NULL); if (!irqs || !regs) - return; - return -ENODEV; ++ continue; grlib_apbuart_nodes[line] = np;