2020-11-03 01:52:27

by Yejune Deng

[permalink] [raw]
Subject: [PATCH] drm/panfrost: Replace devm_reset_control_array_get()

devm_reset_control_array_get_optional_exclusive() looks more readable

Signed-off-by: Yejune Deng <[email protected]>
---
drivers/gpu/drm/panfrost/panfrost_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
index ea8d318..1daf932 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
@@ -18,7 +18,7 @@

static int panfrost_reset_init(struct panfrost_device *pfdev)
{
- pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true);
+ pfdev->rstc = devm_reset_control_array_get_optional_exclusive(pfdev->dev);
if (IS_ERR(pfdev->rstc)) {
dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->rstc));
return PTR_ERR(pfdev->rstc);
--
1.9.1


2020-11-04 11:59:05

by Steven Price

[permalink] [raw]
Subject: Re: [PATCH] drm/panfrost: Replace devm_reset_control_array_get()

On 03/11/2020 01:48, Yejune Deng wrote:
> devm_reset_control_array_get_optional_exclusive() looks more readable
>
> Signed-off-by: Yejune Deng <[email protected]>

Reviewed-by: Steven Price <[email protected]>

Thanks, I'll push this to drm-misc-next.

Steve

> ---
> drivers/gpu/drm/panfrost/panfrost_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index ea8d318..1daf932 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> @@ -18,7 +18,7 @@
>
> static int panfrost_reset_init(struct panfrost_device *pfdev)
> {
> - pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true);
> + pfdev->rstc = devm_reset_control_array_get_optional_exclusive(pfdev->dev);
> if (IS_ERR(pfdev->rstc)) {
> dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->rstc));
> return PTR_ERR(pfdev->rstc);
>