04 Dec, 2013

40 commits

  • This patch implements the data_available() callback for the kfifo buffer instead
    of using the stufftoread flag. The kfifo used by the buffer already knows
    whether it is empty or not based on the position of its read and write pointer.
    Using this makes it a lot easier to tell whether data is available or not and it
    is not necessary to take special measures to ensure that no race conditions
    between reading and writing from the buffer occur.

    Note, that we still have to take the buffers lock to protect against concurrent
    resizeing of the kfifo.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • This patch adds a new data_available() callback to the iio_buffer_access_funcs
    struct. The callback is used to indicate whether data is available in the buffer
    for reading. It is meant to replace the stufftoread flag from the iio_buffer
    struct. The reasoning for this is that the buffer implementation usually can
    determine whether data is available rather easily based on its state, on the
    other hand it can be rather tricky to update the stufftoread flag in a race free
    way.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Some I2C controllers might not be able to handle transfer buffers that are
    stored on stack.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Fixes the following warnings from sparse:
    drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32
    drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32
    drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32
    drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32
    drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32
    drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Some I2C controllers may not be able to handle transfer buffers that are placed
    on the stack.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Fixes the following warnings from sparse:
    drivers/staging/iio/adc/ad7280a.c:194:35: warning: incorrect type in initializer (different base types)
    drivers/staging/iio/adc/ad7280a.c:194:35: expected unsigned int [unsigned] tx_buf
    drivers/staging/iio/adc/ad7280a.c:194:35: got restricted __be32 [usertype]
    drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
    drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
    drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
    drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
    drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
    drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
    drivers/staging/iio/adc/ad7280a.c:219:13: warning: incorrect type in assignment (different base types)
    drivers/staging/iio/adc/ad7280a.c:219:13: expected unsigned int [unsigned] [assigned] reg
    drivers/staging/iio/adc/ad7280a.c:219:13: got restricted __be32 [usertype]

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Fixes the following warnings from sparse:
    drivers/iio/light/vcnl4000.c:88:16: warning: cast to restricted __be16
    drivers/iio/light/vcnl4000.c:88:16: warning: cast to restricted __be16
    drivers/iio/light/vcnl4000.c:88:16: warning: cast to restricted __be16
    drivers/iio/light/vcnl4000.c:88:16: warning: cast to restricted __be16

    Signed-off-by: Lars-Peter Clausen
    Cc: Peter Meerwald
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Fixes the following warnings from sparse:
    drivers/iio/adc/ad7266.c:140:16: warning: cast to restricted __be16
    drivers/iio/adc/ad7266.c:140:16: warning: cast to restricted __be16
    drivers/iio/adc/ad7266.c:140:16: warning: cast to restricted __be16
    drivers/iio/adc/ad7266.c:140:16: warning: cast to restricted __be16

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Some SPI controllers may not be able to handle transfer buffers that are placed
    on the stack.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Fixes the following warnings from sparse:
    drivers/iio/dac/ad5791.c:114:18: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5791.c:114:18: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5791.c:114:18: got restricted __be32 [usertype]
    drivers/iio/dac/ad5791.c:142:21: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5791.c:142:21: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5791.c:142:21: got restricted __be32 [usertype]
    drivers/iio/dac/ad5791.c:144:21: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5791.c:144:21: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5791.c:144:21: got restricted __be32 [usertype]
    drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
    drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
    drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
    drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
    drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
    drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Fixes the following warnings from sparse:
    drivers/iio/dac/ad5755.c:117:25: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5755.c:117:25: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5755.c:117:25: got restricted __be32 [usertype]
    drivers/iio/dac/ad5755.c:171:25: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5755.c:171:25: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5755.c:171:25: got restricted __be32 [usertype]
    drivers/iio/dac/ad5755.c:172:25: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5755.c:172:25: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5755.c:172:25: got restricted __be32 [usertype]
    drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32
    drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32
    drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32
    drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32
    drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32
    drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Fixes the following warnings from sparse:
    drivers/iio/dac/ad5686.c:100:25: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5686.c:100:25: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5686.c:100:25: got restricted __be32 [usertype]
    drivers/iio/dac/ad5686.c:122:25: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5686.c:122:25: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5686.c:122:25: got restricted __be32 [usertype]
    drivers/iio/dac/ad5686.c:124:25: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5686.c:124:25: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5686.c:124:25: got restricted __be32 [usertype]
    drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32
    drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32
    drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32
    drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32
    drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32
    drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Fixes the following warnings from sparse:
    drivers/iio/dac/ad5421.c:134:25: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5421.c:134:25: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5421.c:134:25: got restricted __be32 [usertype]
    drivers/iio/dac/ad5421.c:168:25: warning: incorrect type in assignment (different base types)
    drivers/iio/dac/ad5421.c:168:25: expected unsigned int [unsigned] [usertype] d32
    drivers/iio/dac/ad5421.c:168:25: got restricted __be32 [usertype]
    drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32
    drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32
    drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32
    drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32
    drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32
    drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Some SPI controllers may not be able to handle transfer buffers that are placed
    on the stack.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Fixes the following warnings from sparse:
    drivers/iio/dac/ad5504.c:71:19: warning: incorrect type in initializer (different base types)
    drivers/iio/dac/ad5504.c:71:19: expected unsigned short [unsigned] [usertype] tmp
    drivers/iio/dac/ad5504.c:71:19: got restricted __be16 [usertype]
    drivers/iio/dac/ad5504.c:80:19: warning: incorrect type in initializer (different base types)
    drivers/iio/dac/ad5504.c:80:19: expected unsigned short [unsigned] [usertype] tmp
    drivers/iio/dac/ad5504.c:80:19: got restricted __be16 [usertype]
    drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
    drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
    drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
    drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
    is not preferred.

    Signed-off-by: Jingoo Han
    Signed-off-by: Greg Kroah-Hartman

    Jingoo Han
     
  • Traditionally the "get" functions increment the reference count of the
    object that is returned, which does not happen with vme_slot_get. The
    function vme_slot_get returns the physical VME slot associated with a
    particular struct vme_dev. Rename vme_slot_num to avoid any confusion.

    Signed-off-by: Martyn Welch
    Signed-off-by: Greg Kroah-Hartman

    Martyn Welch
     
  • The match function for vme_user is completely wrong. It will blindly bind
    against the first VME slot on each bus (at this point that would be just the
    first bus as the driver can only handle one bus).

    The original intention (before some major subsystem changes) was that the
    driver bind against the slot to which the bridge was attached in the VME
    system and to the bus(es) provided via the "bus" module parameter.

    To do this cleanly (i.e. without poking arround in the subsystems internal
    stuctures) a functionality has been added to provide access to the bus
    enumeration.

    Signed-off-by: Martyn Welch
    Signed-off-by: Greg Kroah-Hartman

    Martyn Welch
     
  • Fixes the following sparse warning:

    drivers/staging/dwc2/core.c:2672:6: warning:
    symbol 'dwc2_set_param_uframe_sched' was not declared. Should it be static?

    Signed-off-by: Wei Yongjun
    Signed-off-by: Greg Kroah-Hartman

    Wei Yongjun
     
  • This blank line printk is not necessary. Remove it.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • Tidy up the code that does the request_irq().

    Only hookup the commad support if the irq was sucessfully requested.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • These printk messages are just added noise. Remove them.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • Convert this printk messages to a dev_dbg().

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • This printk message is just added noise. Remove it.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • Convert the printk messages in this function to dev_{level} mesages.

    Remove the ones that are just added noise.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • Tidy up the code that does the request_irq().

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • Convert the printk messages in this function to dev_{level} mesages.

    Remove the ones that are just added noise.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • These messages are just added noise. Remove them.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • Tidy up the code that does the request_irq().

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • The support code for this command flag is commented out. Just remove
    it.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • This macro is commented out, thankfully... Remove it.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • Convert the remaining printk messsages in this driver to dev_{level}.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • Tidy up the code that does the request_irq().

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • These messages are just added noise. Remove them.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • These messages are just added noise. Remove them.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • These messages are just added noise. Remove them.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • These messages are just added noise. Remove them.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • The timeouts will return -ETIMEDOUT. The printks are just added noise.
    Remove them.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • These messages are just added noise. Remove them.

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • There's no reason for these messages to be KERN_INFO. Convert them to
    dev_dbg().

    Signed-off-by: H Hartley Sweeten
    Reviewed-by: Ian Abbott
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten