summaryrefslogtreecommitdiffstats
path: root/include/reset_source.h
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2019-08-25 17:58:38 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-08-28 13:33:42 +0200
commite0c563bbf4df3da50d654eb744441f695ceffcac (patch)
tree5edab7cc4b0cf5f6ff2c92820ddac3550e71ef09 /include/reset_source.h
parent058556a5163c68e13ce165f861b895b9f6e9ac32 (diff)
downloadbarebox-e0c563bbf4df3da50d654eb744441f695ceffcac.tar.gz
barebox-e0c563bbf4df3da50d654eb744441f695ceffcac.tar.xz
reset_source: use instance = -1 as default
As with platform device id (does someone still remember?) 0 might be a valid id. So use -1 for "unknown" or "doesn't apply" instead of 0. Also don't pass the instance to the device tree if negative. (This ends up as 0xffffffff otherwise.) Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/reset_source.h')
-rw-r--r--include/reset_source.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/reset_source.h b/include/reset_source.h
index 13bc3bcfde..2848a91115 100644
--- a/include/reset_source.h
+++ b/include/reset_source.h
@@ -49,7 +49,7 @@ static inline enum reset_src_type reset_source_get(void)
static inline int reset_source_get_instance(void)
{
- return 0;
+ return -1;
}
static inline unsigned int of_get_reset_source_priority(struct device_node *node)