From: Greg Kroah-Hartman Date: Mon, 22 Sep 2014 14:30:03 +0000 (-0700) Subject: Merge 3.17-rc6 into staging-next. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d84a2b0d6fecbb6e29875dd9dc97cdcdaa15744a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Merge 3.17-rc6 into staging-next. We want the fixes in there, and it resolves a merge issue with drivers/iio/accel/bma180.c Signed-off-by: Greg Kroah-Hartman --- d84a2b0d6fecbb6e29875dd9dc97cdcdaa15744a diff --cc drivers/iio/accel/bma180.c index 6ef19641457c,19100fddd2ed..f081b007f7d2 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@@ -729,31 -553,29 +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(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);