mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 08:45:26 -05:00
mfd: syscon: Return -EPROBE_DEFER if the syscon is not found
These days we can register syscons with of_syscon_register_regmap() so when we can't find the syscon that probably means it hasn't been registered yet. Return -EPROBE_DEFER so the driver will try probing again. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Chen-Yu Tsai <wens@kernel.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/aQdHmrchkmOr34r3@stanley.mountain Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
@@ -183,7 +183,7 @@ static struct regmap *device_node_get_regmap(struct device_node *np,
|
||||
if (create_regmap)
|
||||
syscon = of_syscon_register(np, check_res);
|
||||
else
|
||||
syscon = ERR_PTR(-EINVAL);
|
||||
syscon = ERR_PTR(-EPROBE_DEFER);
|
||||
}
|
||||
mutex_unlock(&syscon_list_lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user