Revision f58d377f scout_gumstix/encoder/encoder.c

View differences:

scout_gumstix/encoder/encoder.c
166 166
      return 1;
167 167
    }
168 168

  
169
    err = request_irq(enc->irq[i], i? intB : intA, SA_INTERRUPT, "encoder", enc);
169
    err = request_irq(enc->irq[i], i? intB:intA, SA_INTERRUPT, "encoder", enc);
170 170
    if (err < 0) {
171 171
      printk("Error %d requesting irq %d\n", err, enc->irq[i]);
172 172
      return 1;
173 173
    }
174 174

  
175
    err = irq_set_irq_type(enc->irq[i], IRQ_TYPE_EDGE_BOTH);
176
    if (err < 0) {
177
      printk("Error %d setting irq %d type\n", err, enc->irq[i]);
178
      return 1;
179
    }
180

  
175 181
    // TODO the error checking here does not properly clean up after itself
176 182
    // TODO perhaps we should use gpio_request? probably not necessary...
177 183
  }

Also available in: Unified diff