]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/victor-dmm/api.c
drivers: Consistently use same indentation for config_*() API calls.
[libsigrok.git] / src / hardware / victor-dmm / api.c
index d5d7e4a7d079b0386a13dd738d7f71fa52198f12..d03c63980b9a5ba95cb661704fde199ad06e1a00 100644 (file)
@@ -28,7 +28,6 @@
 
 #define VICTOR_VID 0x1244
 #define VICTOR_PID 0xd237
-#define VICTOR_VENDOR "Victor"
 #define VICTOR_INTERFACE 0
 #define VICTOR_ENDPOINT (LIBUSB_ENDPOINT_IN | 1)
 
@@ -74,7 +73,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
                sdi = g_malloc0(sizeof(struct sr_dev_inst));
                sdi->status = SR_ST_INACTIVE;
-               sdi->vendor = g_strdup(VICTOR_VENDOR);
+               sdi->vendor = g_strdup("Victor");
                sdi->connection_id = g_strdup(connection_id);
                devc = g_malloc0(sizeof(struct dev_context));
                sr_sw_limits_init(&devc->limits);
@@ -105,8 +104,6 @@ static int dev_open(struct sr_dev_inst *sdi)
        if (ret != SR_OK)
                return ret;
 
-       /* The device reports as HID class, so the kernel would have
-        * claimed it. */
        if (libusb_kernel_driver_active(usb->devhdl, 0) == 1) {
                if ((ret = libusb_detach_kernel_driver(usb->devhdl, 0)) < 0) {
                        sr_err("Failed to detach kernel driver: %s.",
@@ -140,8 +137,8 @@ static int dev_close(struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *cg)
+static int config_get(uint32_t key, GVariant **data,
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        struct dev_context *devc = sdi->priv;
        struct sr_usb_dev_inst *usb;
@@ -167,8 +164,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
        return SR_OK;
 }
 
-static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *cg)
+static int config_set(uint32_t key, GVariant *data,
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
 
@@ -179,8 +176,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
        return sr_sw_limits_config_set(&devc->limits, key, data);
 }
 
-static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *cg)
+static int config_list(uint32_t key, GVariant **data,
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
 }