mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 14:33:24 -04:00
Replace the open-coded of_address_to_resource() in get_of_data() and the later ioremap() of the memory region with a single devm_platform_get_and_ioremap_resource() call in probe(). This requests the region and maps it once, instead of mapping it without a region request, and removes the redundant second ioremap. Similarly replace irq_of_parse_and_map() with platform_get_irq(), which returns a negative errno on failure (including -EPROBE_DEFER) instead of 0. Both substitutions are equivalent for a DT-backed platform device. The remaining OF accessors are now covered by linux/of.h, so the unused linux/of_address.h and linux/of_irq.h includes are dropped. No functional change; the GPCM window is not claimed by any other driver (fsl_lbc only of_iomap()s its own registers, and sibling eLBC-window drivers use distinct windows), so the new region request cannot conflict. Built for powerpc (allmodconfig + CONFIG_UIO_FSL_ELBC_GPCM) with LLVM=1; drivers/uio/uio_fsl_elbc_gpcm.o compiles cleanly. Assisted-by: opencode:hy3-free Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260722204827.510133-1-rosenp@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>