Skip to contentSkip to conversation

reset: allow drivers to request probe deferral

PATCH New Philipp Zabel 3 participants 3 messages Jul 18, 2013 Reset controller framework

lore
Share & tools
lore

Philipp Zabel

author maintainer
#0 lore raw

PATCH 1/1 reset: allow drivers to request probe deferral

If the requested reset controller is not yet available, have reset_control_get and device_reset return -EPROBE_DEFER so the driver can decide to request probe deferral.

---
 drivers/reset/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/reset/core.c +1 -1
index d1b6089..b3d99a1 100644
@@ -167,7 +167,7 @@ struct reset_control *reset_control_get(struct device *dev, const char *id)
 
 	if (!rcdev) {
 		mutex_unlock(&reset_controller_list_mutex);
-		return ERR_PTR(-ENODEV);
+		return ERR_PTR(-EPROBE_DEFER);
 	}
 
 	rstc_id = rcdev->of_xlate(rcdev, &args);
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/1 reset: allow drivers to request probe deferral

Quoted 14 lines · Philipp Zabel

If the requested reset controller is not yet available, have reset_control_get and device_reset return -EPROBE_DEFER so the driver can decide to request probe deferral.

---
 drivers/reset/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/reset/core.c +0 -0
index d1b6089..b3d99a1 100644

drivers/reset/core.c struct reset_control *reset_control_get(struct device *dev, const char *id) · line 170

Quoted 5 lines
drivers/reset/core.c +1 -1
@@ -167,7 +167,7 @@ struct reset_control *reset_control_get(struct device *dev, const char *id)
 
 	if (!rcdev) {
 		mutex_unlock(&reset_controller_list_mutex);
-		return ERR_PTR(-ENODEV);
+		return ERR_PTR(-EPROBE_DEFER);

Yeah, with the change the client device driver does not need to translate error code -ENODEV into -EPROBE_DEFER, but just return whatever device_reset() returns in error case. So,

Quoted 6 lines
drivers/reset/core.c +0 -0
 	}
 
 	rstc_id = rcdev->of_xlate(rcdev, &args);
Signature · 1 line
1.8.3.2