From 943e94f567a386e3cf754cfe7f4e15893622a95d Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 2 Feb 2013 11:19:03 +0100 Subject: [PATCH] brymen-dmm: Use std_hw_init(). --- hardware/brymen-dmm/api.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/hardware/brymen-dmm/api.c b/hardware/brymen-dmm/api.c index 697959f4..8ff9c2e9 100644 --- a/hardware/brymen-dmm/api.c +++ b/hardware/brymen-dmm/api.c @@ -44,17 +44,7 @@ static struct sr_dev_driver *di = &brymen_dmm_driver_info; static int hw_init(struct sr_context *sr_ctx) { - struct drv_context *drvc; - - if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) { - sr_err("Driver context malloc failed."); - return SR_ERR_MALLOC; - } - - drvc->sr_ctx = sr_ctx; - di->priv = drvc; - - return SR_OK; + return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN); } static void free_instance(void *inst)