iio: adc: at91_adc: const-ify some driver data
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Wed, 30 Sep 2020 13:50:46 +0000 (16:50 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 10 Oct 2020 16:04:58 +0000 (17:04 +0100)
commit3e4ef8e8cefada6b99150011a2d36a89e2fd2380
tree7717cc54687a447e2caed714d962650c9b98b3b2
parentad49bd57f9d574ddc859994db3ba996014e555e0
iio: adc: at91_adc: const-ify some driver data

The main intent is to get rid of the cast for the void-pointer returned by
of_device_get_match_data().

This requires const-ifying the 'caps' and 'registers' references on the
at91_adc_state struct.

The caps can be obtained also from the old platform_data (in the
at91_adc_probe_pdata() function), but that cast is not touched in this
patch, since the old platform_data should be removed/cleaned-away.
Also, that cast deals with converting a kernel_ulong_t type to a pointer.
So, updating that cast doesn't yield any benefit.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200930135048.11530-3-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/at91_adc.c