Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 420fe2e9 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman
Browse files

staging:iio: add caching of the number of bytes in a scan.

parent f1264809
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -66,9 +66,8 @@ static irqreturn_t adis16201_trigger_handler(int irq, void *p)

	int i = 0;
	s16 *data;
	size_t datasize = ring->access->get_bytes_per_datum(ring);

	data = kmalloc(datasize, GFP_KERNEL);
	data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
	if (data == NULL) {
		dev_err(&st->us->dev, "memory alloc failed in ring bh");
		return -ENOMEM;
+1 −2
Original line number Diff line number Diff line
@@ -66,9 +66,8 @@ static irqreturn_t adis16203_trigger_handler(int irq, void *p)

	int i = 0;
	s16 *data;
	size_t datasize = ring->access->get_bytes_per_datum(ring);

	data = kmalloc(datasize, GFP_KERNEL);
	data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
	if (data == NULL) {
		dev_err(&st->us->dev, "memory alloc failed in ring bh");
		return -ENOMEM;
+1 −2
Original line number Diff line number Diff line
@@ -63,9 +63,8 @@ static irqreturn_t adis16204_trigger_handler(int irq, void *p)
	struct iio_buffer *ring = indio_dev->buffer;
	int i = 0;
	s16 *data;
	size_t datasize = ring->access->get_bytes_per_datum(ring);

	data = kmalloc(datasize, GFP_KERNEL);
	data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
	if (data == NULL) {
		dev_err(&st->us->dev, "memory alloc failed in ring bh");
		return -ENOMEM;
+1 −3
Original line number Diff line number Diff line
@@ -61,12 +61,10 @@ static irqreturn_t adis16209_trigger_handler(int irq, void *p)
	struct iio_dev *indio_dev = pf->indio_dev;
	struct adis16209_state *st = iio_priv(indio_dev);
	struct iio_buffer *ring = indio_dev->buffer;

	int i = 0;
	s16 *data;
	size_t datasize = ring->access->get_bytes_per_datum(ring);

	data = kmalloc(datasize , GFP_KERNEL);
	data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
	if (data == NULL) {
		dev_err(&st->us->dev, "memory alloc failed in ring bh");
		return -ENOMEM;
+1 −2
Original line number Diff line number Diff line
@@ -61,9 +61,8 @@ static irqreturn_t adis16240_trigger_handler(int irq, void *p)

	int i = 0;
	s16 *data;
	size_t datasize = ring->access->get_bytes_per_datum(ring);

	data = kmalloc(datasize, GFP_KERNEL);
	data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
	if (data == NULL) {
		dev_err(&st->us->dev, "memory alloc failed in ring bh");
		return -ENOMEM;
Loading