]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/motech-lps-30x/api.c
Drop unnecessary struct sr_dev_driver forward declarations
[libsigrok.git] / src / hardware / motech-lps-30x / api.c
index 8d87da0280cf47ffd1210943ddd7eb59d52a6c4d..7194f313af2c4396c3ef208bb1b132bebfab14a2 100644 (file)
@@ -28,9 +28,6 @@
 #include <math.h>
 #include <string.h>
 #include "protocol.h"
-
-/* Forward declarations */
-SR_PRIV struct sr_dev_driver motech_lps_301_driver_info;
 SR_PRIV int lps_read_reply(struct sr_serial_dev_inst *serial, char **buf, int *buflen);
 SR_PRIV int lps_send_va(struct sr_serial_dev_inst *serial, const char *fmt, va_list args);
 SR_PRIV int lps_cmd_ok(struct sr_serial_dev_inst *serial, const char *fmt, ...);
@@ -133,11 +130,6 @@ static const struct lps_modelspec models[] = {
        },
 };
 
-static int init_lps301(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx, LOG_PREFIX);
-}
-
 /** Send command to device with va_list.
  */
 SR_PRIV int lps_send_va(struct sr_serial_dev_inst *serial, const char *fmt, va_list args)
@@ -705,7 +697,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                        scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
                return SR_OK;
        case SR_CONF_DEVICE_OPTIONS:
-               if (sdi != NULL)
+               if (sdi)
                        break;
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
                        drvopts, ARRAY_SIZE(drvopts), sizeof(uint32_t));
@@ -810,7 +802,7 @@ SR_PRIV struct sr_dev_driver motech_lps_301_driver_info = {
        .name = "motech-lps-301",
        .longname = "Motech LPS-301",
        .api_version = 1,
-       .init = init_lps301,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan_lps301,
        .dev_list = std_dev_list,