+static int init(struct sr_input *in)
+{
+ int num_probes;
+
+ if (in->param && in->param[0]) {
+ num_probes = strtoul(in->param, NULL, 10);
+ if (num_probes < 1)
+ return SR_ERR;
+ } else
+ num_probes = DEFAULT_NUM_PROBES;
+
+ /* create a virtual device */
+ in->vdevice = sr_device_new(NULL, 0, num_probes);
+
+ return SR_OK;
+}