diff options
Diffstat (limited to 'qemu/hw/char/omap_uart.c')
-rw-r--r-- | qemu/hw/char/omap_uart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu/hw/char/omap_uart.c b/qemu/hw/char/omap_uart.c index 88f20943e..415bec5fa 100644 --- a/qemu/hw/char/omap_uart.c +++ b/qemu/hw/char/omap_uart.c @@ -17,6 +17,7 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "sysemu/char.h" #include "hw/hw.h" #include "hw/arm/omap.h" @@ -55,8 +56,7 @@ struct omap_uart_s *omap_uart_init(hwaddr base, qemu_irq txdma, qemu_irq rxdma, const char *label, CharDriverState *chr) { - struct omap_uart_s *s = (struct omap_uart_s *) - g_malloc0(sizeof(struct omap_uart_s)); + struct omap_uart_s *s = g_new0(struct omap_uart_s, 1); s->base = base; s->fclk = fclk; |