Date: Tue, 7 Apr 2015 12:42:07 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281200 - head/sys/dev/uart Message-ID: <201504071242.t37Cg7UU010974@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Tue Apr 7 12:42:06 2015 New Revision: 281200 URL: https://svnweb.freebsd.org/changeset/base/281200 Log: Fix uart_fdt_get_clock. It should have beed using the cell variable passed in, not value on the stack. Modified: head/sys/dev/uart/uart_bus_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Tue Apr 7 10:25:27 2015 (r281199) +++ head/sys/dev/uart/uart_bus_fdt.c Tue Apr 7 12:42:06 2015 (r281200) @@ -66,19 +66,16 @@ static driver_t uart_fdt_driver = { int uart_fdt_get_clock(phandle_t node, pcell_t *cell) { - pcell_t clock; /* clock-frequency is a FreeBSD-only extention. */ - if ((OF_getencprop(node, "clock-frequency", &clock, - sizeof(clock))) <= 0) - clock = 0; - - if (clock == 0) + if ((OF_getencprop(node, "clock-frequency", cell, + sizeof(*cell))) <= 0) { /* Try to retrieve parent 'bus-frequency' */ /* XXX this should go to simple-bus fixup or so */ - if ((OF_getencprop(OF_parent(node), "bus-frequency", &clock, - sizeof(clock))) <= 0) - clock = 0; + if ((OF_getencprop(OF_parent(node), "bus-frequency", cell, + sizeof(*cell))) <= 0) + *cell = 0; + } return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504071242.t37Cg7UU010974>