linux-next: manual merge of the staging tree with Linus' tree

From: Stephen Rothwell
Date: Mon Sep 22 2014 - 01:01:52 EST


Hi Greg,

Today's linux-next merge of the staging tree got a conflict in
drivers/iio/accel/bma180.c between commit 0668a4e4d297 ("iio: accel:
bma180: Fix indio_dev->trig assignment") from Linus' tree and commit
16ed8692fa48 ("iio:bma180: Enable use of device without IRQ") from the
staging tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/iio/accel/bma180.c
index 19100fddd2ed,6ef19641457c..000000000000
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@@ -553,29 -729,31 +729,31 @@@ static int bma180_probe(struct i2c_clie
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &bma180_info;

- trig = iio_trigger_alloc("%s-dev%d", indio_dev->name, indio_dev->id);
- if (!trig) {
- ret = -ENOMEM;
- goto err_chip_disable;
- }
+ if (client->irq > 0) {
+ data->trig = iio_trigger_alloc("%s-dev%d", indio_dev->name,
+ indio_dev->id);
+ if (!data->trig) {
+ ret = -ENOMEM;
+ goto err_chip_disable;
+ }

- ret = devm_request_irq(&client->dev, client->irq,
- iio_trigger_generic_data_rdy_poll,
- IRQF_TRIGGER_RISING, BMA180_IRQ_NAME, trig);
- if (ret) {
- dev_err(&client->dev, "unable to request IRQ\n");
- goto err_trigger_free;
- }
+ ret = devm_request_irq(&client->dev, client->irq,
+ iio_trigger_generic_data_rdy_poll, IRQF_TRIGGER_RISING,
+ "bma180_event", data->trig);
+ if (ret) {
+ dev_err(&client->dev, "unable to request IRQ\n");
+ goto err_trigger_free;
+ }

- trig->dev.parent = &client->dev;
- trig->ops = &bma180_trigger_ops;
- iio_trigger_set_drvdata(trig, indio_dev);
- data->trig = trig;
- indio_dev->trig = iio_trigger_get(trig);
+ data->trig->dev.parent = &client->dev;
+ data->trig->ops = &bma180_trigger_ops;
+ iio_trigger_set_drvdata(data->trig, indio_dev);
- indio_dev->trig = data->trig;
++ indio_dev->trig = iio_trigger_get(data->trig);

- ret = iio_trigger_register(trig);
- if (ret)
- goto err_trigger_free;
+ ret = iio_trigger_register(data->trig);
+ if (ret)
+ goto err_trigger_free;
+ }

ret = iio_triggered_buffer_setup(indio_dev, NULL,
bma180_trigger_handler, NULL);

Attachment: signature.asc
Description: PGP signature