mirror of
https://github.com/torvalds/linux.git
synced 2026-12-01 19:12:36 +00:00
There already is a function to return the offset of the core for a given struct device, so let's reuse that function instead of reimplementing the same logic. There's one change in behavior when a struct device is passed which doesn't match any core's. Before, we would continue through rocket_remove() but now we exit early, to match what other callers of find_core_for_dev() (rocket_device_runtime_resume/suspend()) are doing. This however should never happen. Aside from that, no intended change in behavior. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Signed-off-by: Tomeu Vizoso <[email protected]> Link: https://patch.msgid.link/[email protected]