Skip to contentSkip to conversation

usb: dwc3: core: Replace devm_reset_control_array_get()

PATCH In review Yejune Deng 4 participants 6 messages Nov 3, 2020 – Jan 8, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dwc3: core: Replace devm_reset_control_array_get()

devm_reset_control_array_get_optional_shared() looks more readable

---
 drivers/usb/dwc3/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/core.c +1 -1
index 841daec..b87acf0 100644
@@ -1490,7 +1490,7 @@ static int dwc3_probe(struct platform_device *pdev)
 
 	dwc3_get_properties(dwc);
 
-	dwc->reset = devm_reset_control_array_get(dev, true, true);
+	dwc->reset = devm_reset_control_array_get_optional_shared(dev);
 	if (IS_ERR(dwc->reset))
 		return PTR_ERR(dwc->reset);
 
Signature · 1 line
1.9.1
#1 lore raw

03.11.2020 06:57, Yejune Deng пишет:

Quoted 13 lines

devm_reset_control_array_get_optional_shared() looks more readable

---
 drivers/usb/dwc3/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/core.c +0 -0
index 841daec..b87acf0 100644

drivers/usb/dwc3/core.c static int dwc3_probe(struct platform_device *pdev) · line 1496

Quoted 8 lines
drivers/usb/dwc3/core.c +1 -1
@@ -1490,7 +1490,7 @@ static int dwc3_probe(struct platform_device *pdev)
 
 	dwc3_get_properties(dwc);
 
-	dwc->reset = devm_reset_control_array_get(dev, true, true);
+	dwc->reset = devm_reset_control_array_get_optional_shared(dev);
 	if (IS_ERR(dwc->reset))
 		return PTR_ERR(dwc->reset);
 

Greg / Felipe, could you please pick up this patch?

I want to add devm_reset_control_array_get_exclusive_released() for NVIDIA Tegra drivers and we need to get rid of all the open-coded devm_reset_control_array_get() users in order to extend the reset API sanely.

Thanks in advance.

maintainer
#2 lore raw
Quoted 25 lines · Dmitry Osipenko

03.11.2020 06:57, Yejune Deng пишет:

Quoted 13 lines

devm_reset_control_array_get_optional_shared() looks more readable

---
 drivers/usb/dwc3/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/core.c +0 -0
index 841daec..b87acf0 100644

drivers/usb/dwc3/core.c static int dwc3_probe(struct platform_device *pdev) · line 1496

Quoted 8 lines
drivers/usb/dwc3/core.c +1 -1
@@ -1490,7 +1490,7 @@ static int dwc3_probe(struct platform_device *pdev)
 
 	dwc3_get_properties(dwc);
 
-	dwc->reset = devm_reset_control_array_get(dev, true, true);
+	dwc->reset = devm_reset_control_array_get_optional_shared(dev);
 	if (IS_ERR(dwc->reset))
 		return PTR_ERR(dwc->reset);
 

Greg / Felipe, could you please pick up this patch?

Quoted 4 lines

I want to add devm_reset_control_array_get_exclusive_released() for NVIDIA Tegra drivers and we need to get rid of all the open-coded devm_reset_control_array_get() users in order to extend the reset API sanely.

Care to ack it or send a reviewed-by for it?

thanks,

greg k-h

#3 lore raw

07.01.2021 22:23, Greg KH пишет:

Quoted 26 lines · Dmitry Osipenko
Quoted 25 lines

03.11.2020 06:57, Yejune Deng пишет:

Quoted 13 lines

devm_reset_control_array_get_optional_shared() looks more readable

---
 drivers/usb/dwc3/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/core.c +0 -0
index 841daec..b87acf0 100644

drivers/usb/dwc3/core.c static int dwc3_probe(struct platform_device *pdev) · line 1496

Quoted 8 lines
drivers/usb/dwc3/core.c +1 -1
@@ -1490,7 +1490,7 @@ static int dwc3_probe(struct platform_device *pdev)
 
 	dwc3_get_properties(dwc);
 
-	dwc->reset = devm_reset_control_array_get(dev, true, true);
+	dwc->reset = devm_reset_control_array_get_optional_shared(dev);
 	if (IS_ERR(dwc->reset))
 		return PTR_ERR(dwc->reset);
 

Greg / Felipe, could you please pick up this patch?

Quoted 6 lines
Quoted 4 lines

I want to add devm_reset_control_array_get_exclusive_released() for NVIDIA Tegra drivers and we need to get rid of all the open-coded devm_reset_control_array_get() users in order to extend the reset API sanely.

Care to ack it or send a reviewed-by for it?

I sent r-b, thanks.

Reviewed-by on v1 1/1
#4 lore raw
In reply to Yejune Deng

03.11.2020 06:57, Yejune Deng пишет:

Quoted 13 lines

devm_reset_control_array_get_optional_shared() looks more readable

---
 drivers/usb/dwc3/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/core.c +0 -0
index 841daec..b87acf0 100644

drivers/usb/dwc3/core.c static int dwc3_probe(struct platform_device *pdev) · line 1496

Quoted 8 lines
drivers/usb/dwc3/core.c +1 -1
@@ -1490,7 +1490,7 @@ static int dwc3_probe(struct platform_device *pdev)
 
 	dwc3_get_properties(dwc);
 
-	dwc->reset = devm_reset_control_array_get(dev, true, true);
+	dwc->reset = devm_reset_control_array_get_optional_shared(dev);
 	if (IS_ERR(dwc->reset))
 		return PTR_ERR(dwc->reset);