Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ecf5002 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron
Browse files

staging:iio:spear_adc: Fix sparse warning



The driver is casting from one __iomem pointer to another. Make sure to include
__iomem in the cast, otherwise sparse will complain with the following warning:

	drivers/staging/iio/adc/spear_adc.c:321:18: warning: cast removes address space of expression
	drivers/staging/iio/adc/spear_adc.c:320:33: warning: incorrect type in assignment (different address spaces)
	drivers/staging/iio/adc/spear_adc.c:320:33:    expected struct adc_regs_spear3xx [noderef] <asn:2>*adc_base_spear3xx
	drivers/staging/iio/adc/spear_adc.c:320:33:    got struct adc_regs_spear3xx *<noident>

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent d406fd9d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ static int spear_adc_probe(struct platform_device *pdev)
		return -ENOMEM;
	}
	info->adc_base_spear3xx =
		(struct adc_regs_spear3xx *)info->adc_base_spear6xx;
		(struct adc_regs_spear3xx __iomem *)info->adc_base_spear6xx;

	info->clk = clk_get(dev, NULL);
	if (IS_ERR(info->clk)) {