diff mbox series

[1/2] media: Revert "media: exynos4-is: Add missed check for pinctrl_lookup_state()"

Message ID 20200810153240.23827-1-s.nawrocki@samsung.com (mailing list archive)
State Not Applicable
Headers show
Series [1/2] media: Revert "media: exynos4-is: Add missed check for pinctrl_lookup_state()" | expand

Commit Message

The "idle" pinctrl state is optional as documented in the DT binding.
The change introduced by the commit being reverted makes that pinctrl state
mandatory and breaks initialization of the whole media driver, since the
"idle" state is not specified in any mainline dts.

This reverts commit 18ffec750578f7447c288647d7282c7d12b1d969 to fix
the regression.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
 drivers/media/platform/exynos4-is/media-dev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Hans Verkuil Aug. 19, 2020, 1:15 p.m. UTC | #1
Hi Sylwester,

Can you rebase this patch series on top of the media_tree master?

This series didn't apply anymore.

Thanks!

	Hans

On 10/08/2020 17:32, Sylwester Nawrocki wrote:
> The "idle" pinctrl state is optional as documented in the DT binding.
> The change introduced by the commit being reverted makes that pinctrl state
> mandatory and breaks initialization of the whole media driver, since the
> "idle" state is not specified in any mainline dts.
> 
> This reverts commit 18ffec750578f7447c288647d7282c7d12b1d969 to fix
> the regression.
> 
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
>  drivers/media/platform/exynos4-is/media-dev.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
> index 16dd660..9a57523 100644
> --- a/drivers/media/platform/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/exynos4-is/media-dev.c
> @@ -1268,11 +1268,9 @@ static int fimc_md_get_pinctrl(struct fimc_md *fmd)
>  	if (IS_ERR(pctl->state_default))
>  		return PTR_ERR(pctl->state_default);
>  
> +	/* PINCTRL_STATE_IDLE is optional */
>  	pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl,
>  					PINCTRL_STATE_IDLE);
> -	if (IS_ERR(pctl->state_idle))
> -		return PTR_ERR(pctl->state_idle);
> -
>  	return 0;
>  }
>  
>
Hans Verkuil Aug. 19, 2020, 1:26 p.m. UTC | #2
On 19/08/2020 15:15, Hans Verkuil wrote:
> Hi Sylwester,
> 
> Can you rebase this patch series on top of the media_tree master?
> 
> This series didn't apply anymore.

Never mind, it was a conflict between this patch and this one:

https://patchwork.linuxtv.org/project/linux-media/patch/20200807083548.204360-2-dwlsalmeida@gmail.com/

I'll fix this up myself.

Regards,

	Hans

> 
> Thanks!
> 
> 	Hans
> 
> On 10/08/2020 17:32, Sylwester Nawrocki wrote:
>> The "idle" pinctrl state is optional as documented in the DT binding.
>> The change introduced by the commit being reverted makes that pinctrl state
>> mandatory and breaks initialization of the whole media driver, since the
>> "idle" state is not specified in any mainline dts.
>>
>> This reverts commit 18ffec750578f7447c288647d7282c7d12b1d969 to fix
>> the regression.
>>
>> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>> ---
>>  drivers/media/platform/exynos4-is/media-dev.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
>> index 16dd660..9a57523 100644
>> --- a/drivers/media/platform/exynos4-is/media-dev.c
>> +++ b/drivers/media/platform/exynos4-is/media-dev.c
>> @@ -1268,11 +1268,9 @@ static int fimc_md_get_pinctrl(struct fimc_md *fmd)
>>  	if (IS_ERR(pctl->state_default))
>>  		return PTR_ERR(pctl->state_default);
>>  
>> +	/* PINCTRL_STATE_IDLE is optional */
>>  	pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl,
>>  					PINCTRL_STATE_IDLE);
>> -	if (IS_ERR(pctl->state_idle))
>> -		return PTR_ERR(pctl->state_idle);
>> -
>>  	return 0;
>>  }
>>  
>>
>
diff mbox series

Patch

diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index 16dd660..9a57523 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -1268,11 +1268,9 @@  static int fimc_md_get_pinctrl(struct fimc_md *fmd)
 	if (IS_ERR(pctl->state_default))
 		return PTR_ERR(pctl->state_default);
 
+	/* PINCTRL_STATE_IDLE is optional */
 	pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl,
 					PINCTRL_STATE_IDLE);
-	if (IS_ERR(pctl->state_idle))
-		return PTR_ERR(pctl->state_idle);
-
 	return 0;
 }