17 Aug, 2012

13 commits


16 Jul, 2012

2 commits


14 Jul, 2012

4 commits

  • The data parameters for request_irq and free_irq have to match, otherwise the
    IRQ wont be freed.

    The issue has been discovered using the following coccinelle patch:

    //
    @r1@
    type T;
    T data;
    @@
    (
    request_irq(..., (void *)data)
    |
    request_irq(..., data)
    |
    request_threaded_irq(..., (void *)data)
    |
    request_threaded_irq(..., data)
    )

    @r2@
    type r1.T;
    T data;
    position p;
    @@
    (
    free_irq@p(..., (void *)data)
    |
    free_irq@p(..., data)
    )

    @depends on r1@
    position p != r2.p;
    @@
    *free_irq@p(...)

    //

    Cc: Jon Brenner
    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • The data parameters for request_irq and free_irq have to match, otherwise the
    IRQ wont be freed.

    The issue has been discovered using the following coccinelle patch:

    //
    @r1@
    type T;
    T data;
    @@
    (
    request_irq(..., (void *)data)
    |
    request_irq(..., data)
    |
    request_threaded_irq(..., (void *)data)
    |
    request_threaded_irq(..., data)
    )

    @r2@
    type r1.T;
    T data;
    position p;
    @@
    (
    free_irq@p(..., (void *)data)
    |
    free_irq@p(..., data)
    )

    @depends on r1@
    position p != r2.p;
    @@
    *free_irq@p(...)

    //

    Cc: Roland Stigge
    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • In probe the I2C client data is set to the iio_dev struct in probe(), but
    assumed to be the tsl2X7X_chip struct in remove(). Fix this by reading the
    client data back as iio_dev as well.

    The issue has been discovered using the following coccinelle patch:

    //
    @r1@
    type T;
    T data;
    expression dev;
    @@
    (
    i2c_set_clientdata(dev, (void *)data)
    |
    i2c_set_clientdata(dev, data)
    )

    @r2@
    type r1.T;
    T data;
    position p;
    expression dev;
    @@
    data = i2c_get_clientdata@p(dev)

    @depends on r1@
    position p != r2.p;
    expression dev;
    identifier data;
    @@
    *data = i2c_get_clientdata@p(dev)
    //

    Cc: Jon Brenner
    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • The SPI drvdata is set to adis16260_state struct in probe(), but assumed to be
    the iio_dev struct in remove(). Fix this by setting it to the iio_dev in
    probe().

    The issue has been discovered using the following coccinelle patch:

    //
    @r1@
    type T;
    T data;
    expression dev;
    @@
    (
    spi_set_drvdata(dev, (void *)data)
    |
    spi_set_drvdata(dev, data)
    )

    @r2@
    type r1.T;
    T data;
    position p;
    expression dev;
    @@
    data = spi_get_drvdata@p(dev)

    @depends on r1@
    position p != r2.p;
    expression dev;
    identifier data;
    @@
    *data = spi_get_drvdata@p(dev)
    //

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

    Lars-Peter Clausen
     

13 Jul, 2012

3 commits


11 Jul, 2012

2 commits


10 Jul, 2012

4 commits

  • …23/iio into staging-next

    Mixed back of updates and trivial examples fixes.
    Nothing terribly interesting in this one.

    8 July 2012

    Greg Kroah-Hartman
     
  • Only one of the channels of the ade7758 may be sampled at a time. Use the new
    validate_scan_mask callback and the iio_validate_scan_mask_onehot function to
    implement this restriction. Previously this was implemented using
    available_scan_masks, but this requires a individual scan mask for each channel.

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

    Lars-Peter Clausen
     
  • Only one of the channels of the ad7793 may be sampled at a time. Use the new
    validate_scan_mask callback and the iio_validate_scan_mask_onehot function to
    implement this restriction. Previously this was implemented using
    available_scan_masks, but this requires a individual scan mask for each channel.

    Also the previous code was adding the scan index of the timestamp channel to
    each available scan mask, this is not required though since the timestamp
    channel is not restricted by the available scan masks and can be enabled or
    disabled independently. So the new code does not have to take care of this.

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

    Lars-Peter Clausen
     
  • Only one of the channels of the ad7192 may be sampled at a time. Use the new
    validate_scan_mask callback and the iio_validate_scan_mask_onehot function to
    implement this restriction. Previously this was implemented using
    available_scan_masks, but this requires a individual scan mask for each channel.

    Also the previous code was adding the scan index of the timestamp channel to
    each available scan mask, this is not required though since the timestamp
    channel is not restricted by the available scan masks and can be enabled or
    disabled independently. So the new code does not have to take care of this.

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

    Lars-Peter Clausen
     

09 Jul, 2012

12 commits