From e4ffb9d69985320cd0a13f5643a13a181527734d Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Fri, 25 Jan 2013 20:42:43 +0100 Subject: [PATCH] Use sr_dev_has_option() where appropriate. --- sigrok-cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sigrok-cli.c b/sigrok-cli.c index df8236e..6512ff7 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -1312,7 +1312,7 @@ static int set_limit_time(const struct sr_dev_inst *sdi) return SR_ERR; } - if (sr_driver_hwcap_exists(sdi->driver, SR_CONF_LIMIT_MSEC)) { + if (sr_dev_has_option(sdi, SR_CONF_LIMIT_MSEC)) { if (sr_config_set(sdi, SR_CONF_LIMIT_MSEC, &time_msec) != SR_OK) { g_critical("Failed to configure time limit."); sr_session_destroy(); @@ -1404,7 +1404,7 @@ static void run_session(void) } if (opt_continuous) { - if (!sr_driver_hwcap_exists(sdi->driver, SR_CONF_CONTINUOUS)) { + if (!sr_dev_has_option(sdi, SR_CONF_CONTINUOUS)) { g_critical("This device does not support continuous sampling."); sr_session_destroy(); return; -- 2.30.2