leds: simatic-ipc-leds: Don't directly deref ioremap_resource() returned ptr
authorHans de Goede <hdegoede@redhat.com>
Mon, 17 Jan 2022 11:21:09 +0000 (12:21 +0100)
committerPavel Machek <pavel@ucw.cz>
Thu, 17 Feb 2022 11:25:30 +0000 (12:25 +0100)
commit8b43ef06ff893f733a0b66e9875518c0230f2715
tree18f6878fa9034a20ef22976b759ed4e58f095ffa
parenta8f59497a430e8a93aa9a5b0fb0feefe061195ee
leds: simatic-ipc-leds: Don't directly deref ioremap_resource() returned ptr

Sparse (rightly) currently gives the following warning:

drivers/leds/simple/simatic-ipc-leds.c:155:40:
 sparse: sparse: incorrect type in assignment (different address spaces)
 expected void *static [toplevel] simatic_ipc_led_memory
 got void [noderef] __iomem *

Fix this by changing the type of simatic_ipc_led_memory to void __iomem *
and use readl()/writel() to access it.

Cc: Henning Schild <henning.schild@siemens.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Gerd Haeussler <gerd.haeussler.ext@siemens.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/simple/simatic-ipc-leds.c