diff options
| author | Amin GATTOUT <amin.gattout@gmail.com> | 2026-07-22 21:39:32 +0200 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-07-27 22:13:07 +0100 |
| commit | 9e6679200309ce746f409cc9bc2d2c49361f79c5 (patch) | |
| tree | 9310759050dc4d9472bde76b01a64a60e9efa859 | |
| parent | cad928dad9a4c26aa56b4223dc2a29bca517fb5f (diff) | |
| download | linux-next-9e6679200309ce746f409cc9bc2d2c49361f79c5.tar.gz linux-next-9e6679200309ce746f409cc9bc2d2c49361f79c5.zip | |
iio: adc: at91_adc: use const char * for DT string property
Declare the local variable as const char * and remove the unnecessary cast
when passing it to of_property_read_string().
Signed-off-by: Amin GATTOUT <amin.gattout@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
| -rw-r--r-- | drivers/iio/adc/at91_adc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index f610ad729bf3..0ac74ad92fca 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c @@ -988,7 +988,7 @@ static int at91_adc_probe(struct platform_device *pdev) struct iio_dev *idev; struct at91_adc_state *st; u32 reg, prop; - char *s; + const char *s; idev = devm_iio_device_alloc(&pdev->dev, sizeof(struct at91_adc_state)); if (!idev) @@ -1023,7 +1023,7 @@ static int at91_adc_probe(struct platform_device *pdev) st->res = st->caps->high_res_bits; if (st->caps->low_res_bits && - !of_property_read_string(node, "atmel,adc-use-res", (const char **)&s) + !of_property_read_string(node, "atmel,adc-use-res", &s) && !strcmp(s, "lowres")) st->res = st->caps->low_res_bits; |
