Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: adis_trigger: Remove code to set trigger parent

iio_trigger_set_drvdata() sets the trigger device parent to first
argument of viio_trigger_alloc(), no need to do it again in the driver
code.
Remove adis_trigger_setup() to match other drivers where setting the
trigger is usually done in the probe() routine.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20210309193620.2176163-4-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Gwendal Grignou and committed by
Jonathan Cameron
5c68f053 8a225220

+2 -8
+2 -8
drivers/iio/imu/adis_trigger.c
··· 27 27 .set_trigger_state = &adis_data_rdy_trigger_set_state, 28 28 }; 29 29 30 - static void adis_trigger_setup(struct adis *adis) 31 - { 32 - adis->trig->dev.parent = &adis->spi->dev; 33 - adis->trig->ops = &adis_trigger_ops; 34 - iio_trigger_set_drvdata(adis->trig, adis); 35 - } 36 - 37 30 static int adis_validate_irq_flag(struct adis *adis) 38 31 { 39 32 /* ··· 65 72 if (!adis->trig) 66 73 return -ENOMEM; 67 74 68 - adis_trigger_setup(adis); 75 + adis->trig->ops = &adis_trigger_ops; 76 + iio_trigger_set_drvdata(adis->trig, adis); 69 77 70 78 ret = adis_validate_irq_flag(adis); 71 79 if (ret)