]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/fluke-dmm/api.c
Consistently don't check sdi->priv in dev_acquisition_start().
[libsigrok.git] / src / hardware / fluke-dmm / api.c
index 47f598f22d5ed5b6f3cb6e677aff91ec77c60f7d..a7b2e14d0d103dbfb25479a6cd9d475e0405d795 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <glib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -55,6 +56,7 @@ static const struct flukedmm_profile supported_flukedmm[] = {
        { FLUKE_189, "189", 100, 1000 },
        { FLUKE_287, "287", 100, 1000 },
        { FLUKE_190, "199B", 1000, 3500 },
+       { FLUKE_289, "289", 100, 1000 },
 };
 
 static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
@@ -257,14 +259,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
 
-       if (!(devc = sdi->priv)) {
-               sr_err("sdi->priv was NULL.");
-               return SR_ERR_BUG;
-       }
-
+       devc = sdi->priv;
        devc->cb_data = cb_data;
 
-       /* Send header packet to the session bus. */
        std_session_send_df_header(cb_data, LOG_PREFIX);
 
        /* Poll every 100ms, or whenever some data comes in. */