{
struct usbduxsigma_private *this_usbduxsub = dev->private;
int ret;
- if (!this_usbduxsub)
- return -EFAULT;
down(&this_usbduxsub->sem);
if (trignum != 0) {
uint8_t muxsg1 = 0;
uint8_t sysred = 0;
- if (!this_usbduxsub)
- return -EFAULT;
-
/* block other CPUs from starting an ai_cmd */
down(&this_usbduxsub->sem);
if (this_usbduxsub->ai_cmd_running) {
uint8_t muxsg1 = 0;
uint8_t sysred = 0;
- if (!this_usbduxsub)
- return 0;
-
down(&this_usbduxsub->sem);
if (this_usbduxsub->ai_cmd_running) {
dev_err(&this_usbduxsub->interface->dev,
uint32_t one;
int err;
- if (!this_usbduxsub)
- return 0;
-
if (this_usbduxsub->ai_cmd_running) {
dev_err(&this_usbduxsub->interface->dev,
"comedi%d: status read not possible. "
int i;
int chan = CR_CHAN(insn->chanspec);
- if (!this_usbduxsub)
- return -EFAULT;
-
down(&this_usbduxsub->sem);
for (i = 0; i < insn->n; i++)
data[i] = this_usbduxsub->outBuffer[chan];
int i, err;
int chan = CR_CHAN(insn->chanspec);
- if (!this_usbduxsub)
- return -EFAULT;
-
down(&this_usbduxsub->sem);
if (this_usbduxsub->ao_cmd_running) {
dev_err(&this_usbduxsub->interface->dev,
struct usbduxsigma_private *this_usbduxsub = dev->private;
int ret;
- if (!this_usbduxsub)
- return -EFAULT;
-
down(&this_usbduxsub->sem);
if (trignum != 0) {
dev_err(&this_usbduxsub->interface->dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{
- struct usbduxsigma_private *this_usbduxsub = dev->private;
int err = 0;
unsigned int flags;
- if (!this_usbduxsub)
- return -EFAULT;
-
/* Step 1 : check if triggers are trivially valid */
err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW | TRIG_INT);
unsigned int chan, gain;
int i, ret;
- if (!this_usbduxsub)
- return -EFAULT;
-
down(&this_usbduxsub->sem);
/* set current channel of the running acquisition to zero */
s->async->cur_chan = 0;
struct usbduxsigma_private *this_usbduxsub = dev->private;
int err;
- if (!this_usbduxsub)
- return -EFAULT;
-
down(&this_usbduxsub->sem);
/* The insn data is a mask in data[0] and the new data
char sgn_mask;
char c;
- if (!this_usbduxsub)
- return -EFAULT;
-
/* this is the DIO bit which carries the PWM data */
pwm_mask = (1 << channel);
/* this is the DIO bit which carries the optional direction bit */
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{
- struct usbduxsigma_private *this_usbduxsub = dev->private;
-
- if (!this_usbduxsub)
- return -EFAULT;
-
if ((insn->n) != 1) {
/*
* doesn't make sense to have more than one value here because
{
int i;
- if (!usbduxsub_tmp)
- return;
-
/* shows the usb subsystem that the driver is down */
if (usbduxsub_tmp->interface)
usb_set_intfdata(usbduxsub_tmp->interface, NULL);