Re: [PATCH 17/20] media: atomisp: Move calling of css_[un]init() to power_on()/_off()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 11/21/22 10:14, Andy Shevchenko wrote:
> On Sun, Nov 20, 2022 at 11:40:58PM +0100, Hans de Goede wrote:
>> atomisp_css_init() is always called after calling atomisp_power_on()
>> either directly or through getting a runtime-pm reference.
>>
>> Likewise atomisp_css_uninit() is always called after calling
>> atomisp_power_off().
>>
>> Move the call site of these 2 functions to inside atomisp_power_on() /
>> atomisp_power_off() to make this more explicit.
> 
> ...
> 
>>  	dev_dbg(isp->dev, "%s\n", __func__);
>> -	atomisp_css_uninit(isp);
>> +
>>  	ret = atomisp_power_off(isp->dev);
>>  	if (ret < 0)
>>  		dev_err(isp->dev, "atomisp_power_off failed, %d\n", ret);
>>  
>>  	ret = atomisp_power_on(isp->dev);
>> -	if (ret < 0)
>> +	if (ret < 0) {
>>  		dev_err(isp->dev, "atomisp_power_on failed, %d\n", ret);
>> -
>> -	ret = atomisp_css_init(isp);
>> -	if (ret)
> 
>>  		isp->isp_fatal_error = true;
> 
> This was only set when css_init() failed, now it may be set even when
> power_on() fails. Why is it not a problem? Commit message doesn't shed
> a light on this change.

Failing to power-on the device is pretty fatal too, but this is indeed
a behavior change. I have updated the commit message to reflect this.

Regards,

Hans





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux