Re: [RFC v2 PATCH 07/14] iio: st_accel: Add event subsystem to st_accel driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 09/27/13 17:32, Lukasz Czerwinski wrote:
> This patch adds event support for iio st_accel driver.
> 
> Signed-off-by: Lukasz Czerwinski <l.czerwinski@xxxxxxxxxxx>
> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
One bug introduced...

There is no need to have a dataready interrupt to make use of triggers
(i.e. to have a buffer). It is obviously needed to provide a trigger, but
there are plenty of others available (sysfs, soon to be high resolution timer,
general interrupt - usually gpio, and lots of driver provided ones).

Here the buffer is created whatever, but it is only freed if there is a
dataready interrupt.  Clearly that doesn't make sense.

I'm guessing this might be a merge issue rather than being deliberate!
...
> @@ -511,10 +595,10 @@ void st_accel_common_remove(struct iio_dev *indio_dev)
>  	struct st_sensor_data *adata = iio_priv(indio_dev);
>  
>  	iio_device_unregister(indio_dev);
> -	if (adata->get_irq_data_ready(indio_dev) > 0)
> +	if (adata->get_irq_data_ready(indio_dev) > 0) {
>  		st_sensors_deallocate_trigger(indio_dev);
> -
> -	st_accel_deallocate_ring(indio_dev);
> +		st_accel_deallocate_ring(indio_dev);
deallocating the ring is not dependent on the data_ready irq.
> +	}
>  }
>  EXPORT_SYMBOL(st_accel_common_remove);
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux