drivers: Eliminate some unnecessary vendor/model #defines.
Most drivers use the vendor/model strings directly already; make all of them do that consistently.
This commit is contained in:
parent
f8195cb2da
commit
b15ff1c92a
|
@ -112,8 +112,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_INITIALIZING;
|
||||
sdi->vendor = g_strdup(USB_VENDOR_NAME);
|
||||
sdi->model = g_strdup(USB_MODEL_NAME);
|
||||
sdi->vendor = g_strdup("ASIX");
|
||||
sdi->model = g_strdup("SIGMA");
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(channel_names); i++)
|
||||
sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, channel_names[i]);
|
||||
|
|
|
@ -43,8 +43,6 @@
|
|||
#define USB_VENDOR 0xa600
|
||||
#define USB_PRODUCT 0xa000
|
||||
#define USB_DESCRIPTION "ASIX SIGMA"
|
||||
#define USB_VENDOR_NAME "ASIX"
|
||||
#define USB_MODEL_NAME "SIGMA"
|
||||
|
||||
enum sigma_write_register {
|
||||
WRITE_CLOCK_SELECT = 0,
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#define SERIALCOMM_1X_RS232 "8228/6n1/dtr=1/rts=1/flow=0" /* =8192, closer with divider */
|
||||
#define SERIALCOMM_2X_RS232 "9600/6n1/dtr=1/rts=1/flow=0"
|
||||
#define SERIALCOMM_2X "9600/8n1/dtr=1/rts=1/flow=0"
|
||||
#define VENDOR_GMC "Gossen Metrawatt"
|
||||
|
||||
static const uint32_t scanopts[] = {
|
||||
SR_CONF_CONN,
|
||||
|
@ -195,10 +194,10 @@ static GSList *scan_1x_2x_rs232(struct sr_dev_driver *di, GSList *options)
|
|||
}
|
||||
|
||||
if (model != METRAHIT_NONE) {
|
||||
sr_spew("%s %s detected!", VENDOR_GMC, gmc_model_str(model));
|
||||
sr_spew("%s detected!", gmc_model_str(model));
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup(VENDOR_GMC);
|
||||
sdi->vendor = g_strdup("Gossen Metrawatt");
|
||||
sdi->model = g_strdup(gmc_model_str(model));
|
||||
devc = g_malloc0(sizeof(struct dev_context));
|
||||
sr_sw_limits_init(&devc->limits);
|
||||
|
@ -258,7 +257,7 @@ static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options)
|
|||
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup(VENDOR_GMC);
|
||||
sdi->vendor = g_strdup("Gossen Metrawatt");
|
||||
sdi->priv = devc;
|
||||
|
||||
/* Send message 03 "Query multimeter version and status" */
|
||||
|
@ -286,7 +285,7 @@ static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options)
|
|||
devc->buflen = 0;
|
||||
|
||||
if (devc->model != METRAHIT_NONE) {
|
||||
sr_spew("%s %s detected!", VENDOR_GMC, gmc_model_str(devc->model));
|
||||
sr_spew("%s detected!", gmc_model_str(devc->model));
|
||||
sr_sw_limits_init(&devc->limits);
|
||||
sdi->model = g_strdup(gmc_model_str(devc->model));
|
||||
sdi->version = g_strdup_printf("Firmware %d.%d", devc->fw_ver_maj, devc->fw_ver_min);
|
||||
|
@ -297,7 +296,7 @@ static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options)
|
|||
devc = g_malloc0(sizeof(struct dev_context));
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup(VENDOR_GMC);
|
||||
sdi->vendor = g_strdup("Gossen Metrawatt");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -104,8 +104,8 @@ 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(VENDOR_NAME);
|
||||
sdi->model = g_strdup(MODEL_NAME);
|
||||
sdi->vendor = g_strdup("IKALOGIC");
|
||||
sdi->model = g_strdup("Scanalogic-2");
|
||||
sdi->version = g_strdup_printf("%u.%u", dev_info.fw_ver_major, dev_info.fw_ver_minor);
|
||||
sdi->serial_num = g_strdup_printf("%d", dev_info.serial);
|
||||
sdi->priv = devc;
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
|
||||
#define LOG_PREFIX "ikalogic-scanalogic2"
|
||||
|
||||
#define VENDOR_NAME "IKALOGIC"
|
||||
#define MODEL_NAME "Scanalogic-2"
|
||||
|
||||
#define USB_VID_PID "20a0.4123"
|
||||
#define USB_INTERFACE 0
|
||||
#define USB_TIMEOUT_MS (5 * 1000)
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
|
||||
#define USB_VENDOR_ID 0x0403
|
||||
#define USB_DEVICE_ID 0x6014
|
||||
#define USB_VENDOR_NAME "IKALOGIC"
|
||||
#define USB_MODEL_NAME "ScanaPLUS"
|
||||
#define USB_IPRODUCT "SCANAPLUS"
|
||||
|
||||
#define SAMPLE_BUF_SIZE (8 * 1024 * 1024)
|
||||
|
@ -97,8 +95,8 @@ 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(USB_VENDOR_NAME);
|
||||
sdi->model = g_strdup(USB_MODEL_NAME);
|
||||
sdi->vendor = g_strdup("IKALOGIC");
|
||||
sdi->model = g_strdup("ScanaPLUS");
|
||||
sdi->priv = devc;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(channel_names); i++)
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "protocol.h"
|
||||
|
||||
#define USB_CONN "1041.8101"
|
||||
#define VENDOR "Kecheng"
|
||||
#define USB_INTERFACE 0
|
||||
|
||||
static const uint32_t drvopts[] = {
|
||||
|
@ -122,7 +121,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
continue;
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup(VENDOR);
|
||||
sdi->vendor = g_strdup("Kecheng");
|
||||
sdi->model = model; /* Already g_strndup()'d. */
|
||||
sdi->inst_type = SR_INST_USB;
|
||||
sdi->conn = l->data;
|
||||
|
|
|
@ -324,7 +324,7 @@ static struct sr_dev_inst *lascar_identify(unsigned char *config)
|
|||
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup(LASCAR_VENDOR);
|
||||
sdi->vendor = g_strdup("Lascar");
|
||||
sdi->model = g_strdup(profile->modelname);
|
||||
sdi->version = g_strdup(firmware);
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#define LOG_PREFIX "lascar-el-usb"
|
||||
|
||||
#define LASCAR_VENDOR "Lascar"
|
||||
#define LASCAR_INTERFACE 0
|
||||
#define LASCAR_EP_IN 0x82
|
||||
#define LASCAR_EP_OUT 2
|
||||
|
|
|
@ -32,8 +32,6 @@ SR_PRIV int lps_query_status(struct sr_dev_inst *sdi);
|
|||
|
||||
#define SERIALCOMM "2400/8n1/dtr=1/rts=1/flow=0"
|
||||
|
||||
#define VENDOR_MOTECH "Motech"
|
||||
|
||||
static const uint32_t scanopts[] = {
|
||||
SR_CONF_CONN,
|
||||
SR_CONF_SERIALCOMM,
|
||||
|
@ -423,7 +421,7 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o
|
|||
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup(VENDOR_MOTECH);
|
||||
sdi->vendor = g_strdup("Motech");
|
||||
sdi->model = g_strdup(models[modelid].modelstr);
|
||||
sdi->version = g_strdup(verstr);
|
||||
sdi->inst_type = SR_INST_SERIAL;
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#define USB_VENDOR_ID 0x0403
|
||||
#define USB_DEVICE_ID 0x6010
|
||||
#define USB_VENDOR_NAME "Saanlima"
|
||||
#define USB_IPRODUCT "Pipistrello LX45"
|
||||
|
||||
#define FTDI_BUF_SIZE (16 * 1024)
|
||||
|
|
|
@ -67,7 +67,7 @@ static struct sr_dev_inst *dev_inst_new(const struct model_info *model)
|
|||
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup(VENDOR_NAME);
|
||||
sdi->vendor = g_strdup("SysClk");
|
||||
sdi->model = g_strdup(model->name);
|
||||
sdi->priv = devc;
|
||||
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
#include <libsigrok/libsigrok.h>
|
||||
#include <libsigrok-internal.h>
|
||||
|
||||
#define VENDOR_NAME "SysClk"
|
||||
|
||||
/* Maximum configurable sample count limit.
|
||||
* Due to compression, there is no meaningful hardware limit the driver
|
||||
* could report. So this value is less than 2^64-1 for no reason other
|
||||
|
|
|
@ -74,8 +74,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
for (l = usb_devices; l; l = l->next) {
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup(VENDOR);
|
||||
sdi->model = g_strdup(MODEL);
|
||||
sdi->vendor = g_strdup("UNI-T");
|
||||
sdi->model = g_strdup("UT32x");
|
||||
sdi->inst_type = SR_INST_USB;
|
||||
sdi->conn = l->data;
|
||||
for (i = 0; i < ARRAY_SIZE(channel_names); i++)
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
#define DEFAULT_DATA_SOURCE DATA_SOURCE_LIVE
|
||||
#define USB_CONN "1a86.e008"
|
||||
#define VENDOR "UNI-T"
|
||||
#define MODEL "UT32x"
|
||||
#define USB_INTERFACE 0
|
||||
#define USB_CONFIGURATION 1
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
static struct sr_dev_driver yokogawa_dlm_driver_info;
|
||||
|
||||
static const char *MANUFACTURER_ID = "YOKOGAWA";
|
||||
static const char *MANUFACTURER_NAME = "Yokogawa";
|
||||
|
||||
static const uint32_t scanopts[] = {
|
||||
SR_CONF_CONN,
|
||||
|
@ -87,7 +86,7 @@ static struct sr_dev_inst *probe_usbtmc_device(struct sr_scpi_dev_inst *scpi)
|
|||
goto fail;
|
||||
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->vendor = g_strdup(MANUFACTURER_NAME);
|
||||
sdi->vendor = g_strdup("Yokogawa");
|
||||
sdi->model = g_strdup(model_name);
|
||||
sdi->version = g_strdup(hw_info->firmware_version);
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <config.h>
|
||||
#include "protocol.h"
|
||||
|
||||
#define VENDOR_NAME "ZEROPLUS"
|
||||
#define USB_INTERFACE 0
|
||||
#define USB_CONFIGURATION 1
|
||||
#define NUM_TRIGGER_STAGES 4
|
||||
|
@ -210,7 +209,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(VENDOR_NAME);
|
||||
sdi->vendor = g_strdup("ZEROPLUS");
|
||||
sdi->model = g_strdup(prof->model_name);
|
||||
sdi->serial_num = g_strdup(serial_num);
|
||||
sdi->connection_id = g_strdup(connection_id);
|
||||
|
|
Loading…
Reference in New Issue