1. 03 Mar, 2016 32 commits
  2. 02 Mar, 2016 1 commit
  3. 01 Mar, 2016 7 commits
    • Mauro Carvalho Chehab's avatar
      [media] lirc_dev: avoid double mutex unlock · b64e10f3
      Mauro Carvalho Chehab authored
      We can only unlock if mutex_lock() succeeds.
      
      Fixes the following warning:
      	drivers/media/rc/lirc_dev.c:535 lirc_dev_fop_close() error: double unlock 'mutex:&lirc_dev_lock'
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      b64e10f3
    • Mauro Carvalho Chehab's avatar
      [media] ati_remote: Put timeouts at the accel array · fe28f5de
      Mauro Carvalho Chehab authored
      Instead of having the timeouts hardcoded, and getting only the
      accel value from the array, put everything in the same place.
      
      That simplifies the logic.
      
      As a side effect, it also cleans several smatch errors:
      	include/linux/jiffies.h:359:41: error: strange non-value function or array
      	include/linux/jiffies.h:361:42: error: strange non-value function or array
      (one per time_after/time_before line)
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      fe28f5de
    • Mauro Carvalho Chehab's avatar
      [media] pt3: fix device identification · 55a1a9f1
      Mauro Carvalho Chehab authored
      As warned by smatch:
      	drivers/media/pci/pt3/pt3.c:398 pt3_attach_fe() error: strncmp() '"tc90522sat"' too small (11 vs 20)
      
      Clearly, the logic is doing the wrong thing, as it is not comparing the strings
      on the right way.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      55a1a9f1
    • Mauro Carvalho Chehab's avatar
      [media] technisat-usb2: don't do DMA on the stack · 5d0f2df4
      Mauro Carvalho Chehab authored
      As warned by smatch:
      	drivers/media/usb/dvb-usb/technisat-usb2.c:263 technisat_usb2_set_led() error: doing dma on the stack (led)
      	drivers/media/usb/dvb-usb/technisat-usb2.c:280 technisat_usb2_set_led_timer() error: doing dma on the stack (&b)
      	drivers/media/usb/dvb-usb/technisat-usb2.c:341 technisat_usb2_identify_state() error: doing dma on the stack (version)
      	drivers/media/usb/dvb-usb/technisat-usb2.c:609 technisat_usb2_get_ir() error: doing dma on the stack (buf)
      	drivers/media/usb/dvb-usb/technisat-usb2.c:619 technisat_usb2_get_ir() error: doing dma on the stack (buf)
      
      Create a buffer at the device state and use it for all the DMA
      transfers.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      5d0f2df4
    • Mauro Carvalho Chehab's avatar
      [media] dib0090: Do the right check for state->rf_ramp · 57bcbde9
      Mauro Carvalho Chehab authored
      Smatch with -pkernel --no-data keeps complaining about rf_ramp:
      	drivers/media/dvb-frontends/dib0090.c:1119 dib0090_pwm_gain_reset() error: we previously assumed 'state->rf_ramp' could be null (see line 1086)
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      57bcbde9
    • Mauro Carvalho Chehab's avatar
      [media] drxj: don't do math if not needed · b6554ea5
      Mauro Carvalho Chehab authored
      While there's no risk of divison by zero, the logic there is akward, as it
      does the calculus for the numerator and denominator before checking
      if this will be used.
      
      Change the order to check first if the denominator is zero, and only
      calculating the numerator/denominator if not.
      
      This should also avoid those smatch errors:
      	drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero
      	drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero
      	drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero
      	drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero
      	drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      b6554ea5
    • Mauro Carvalho Chehab's avatar
      [media] airspy: fix bit set/clean mess on s->flags · f6f7b58e
      Mauro Carvalho Chehab authored
      As warned by smatch:
      	drivers/media/usb/airspy/airspy.c:541 airspy_start_streaming() warn: test_bit() takes a bit number
      	drivers/media/usb/airspy/airspy.c:569 airspy_start_streaming() warn: test_bit() takes a bit number
      	drivers/media/usb/airspy/airspy.c:605 airspy_stop_streaming() warn: test_bit() takes a bit number
      
      set_bit/clear_bit argument is the bit number, and not 1 << bit.
      
      Thankfully, one of the bits was not used (URB_BUF), with would
      otherwise cause a driver misfunctioning.
      
      Clean this mess by always using set_bit/clear_bit/test_bit and
      removing the unused bit.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      f6f7b58e