From d3be83244c7dfe686d23f1c0bac75915587fc044 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Fri, 22 May 2020 11:22:05 +0300 Subject: iio: remove explicit IIO device parent assignment This patch applies the semantic patch: @@ expression I, P, SP; @@ I = devm_iio_device_alloc(P, SP); ... - I->dev.parent = P; It updates 302 files and does 307 deletions. This semantic patch also removes some comments like '/* Establish that the iio_dev is a child of the i2c device */' But this is is only done in case where the block is left empty. The patch does not seem to cover all cases. It looks like in some cases a different variable is used in some cases to assign the parent, but it points to the same reference. In other cases, the block covered by ... may be just too big to be covered by the semantic patch. However, this looks pretty good as well, as it does cover a big bulk of the drivers that should remove the parent assignment. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron --- drivers/iio/adc/twl6030-gpadc.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/iio/adc/twl6030-gpadc.c') diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c index f24148bd15de..bd501a09bc98 100644 --- a/drivers/iio/adc/twl6030-gpadc.c +++ b/drivers/iio/adc/twl6030-gpadc.c @@ -926,7 +926,6 @@ static int twl6030_gpadc_probe(struct platform_device *pdev) } indio_dev->name = DRIVER_NAME; - indio_dev->dev.parent = dev; indio_dev->info = &twl6030_gpadc_iio_info; indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->channels = pdata->iio_channels; -- cgit v1.2.3 From dd54f40ac3a9b36ef2ea7c4d1bbeb46d3a1828e5 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 17 Jul 2020 17:55:13 +0100 Subject: iio: adc: twl6030-gpadc: Fix some misdocumentation and formatting issues Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/twl6030-gpadc.c:110: warning: Function parameter or member 'ideal' not described in 'twl6030_gpadc_platform_data' drivers/iio/adc/twl6030-gpadc.c:110: warning: Function parameter or member 'channel_to_reg' not described in 'twl6030_gpadc_platform_data' Cc: Stephen Boyd Cc: Nishant Kamat Cc: Balaji T K Cc: Graeme Gregory Cc: Girish S Ghongdemath Cc: Ambresh K Cc: Oleksandr Kozaruk Cc: Mikko Ylinen Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron --- drivers/iio/adc/twl6030-gpadc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/iio/adc/twl6030-gpadc.c') diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c index bd501a09bc98..c6416ad795ca 100644 --- a/drivers/iio/adc/twl6030-gpadc.c +++ b/drivers/iio/adc/twl6030-gpadc.c @@ -94,9 +94,9 @@ struct twl6030_gpadc_data; * struct twl6030_gpadc_platform_data - platform specific data * @nchannels: number of GPADC channels * @iio_channels: iio channels - * @twl6030_ideal: pointer to calibration parameters + * @ideal: pointer to calibration parameters * @start_conversion: pointer to ADC start conversion function - * @channel_to_reg pointer to ADC function to convert channel to + * @channel_to_reg: pointer to ADC function to convert channel to * register address for reading conversion result * @calibrate: pointer to calibration function */ -- cgit v1.2.3