Re: [PATCH 15/20] media: atomisp: Remove sw_contex.power_state checks

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

 



On Mon, Nov 21, 2022 at 11:09:44AM +0200, Andy Shevchenko wrote:
> On Sun, Nov 20, 2022 at 11:40:56PM +0100, Hans de Goede wrote:
> > Remove the unnecessary sw_contex.power_state checks:
> > 
> > 1. atomisp_freq_scaling() and atomisp_stop_streaming() only run when the
> >    ISP is powered up through runtime-pm, so the checkes are not necessary
> > 
> > 2. atomisp_mrfld_pre_power_down() and atomisp_runtime_resume() are only
> >    called through the driver-core pm handling code which already
> >    guarantees they are not called when already powered down / up.
> > 
> > 3. atomisp_isr() also checks isp->css_initialized which only gets set
> >    by atomisp_css_init() which runs *after* powering up the ISP and
> >    which gets cleared by atomisp_css_uninit() *before* before powering
> >    down the ISP.
> > 
> > So all the checks are unnecessary, remove them as well as the
> > sw_contex.power_state field itself.
> 
> ...
> 
> > +	/*Turn on ISP d-phy */
> 
> While at it, you may add a whitespace after /*.

Okay, it's going to be removed by one of the following changes.
No need to amend.

> > +	ret = atomisp_ospm_dphy_up(isp);
> > +	if (ret) {
> > +		dev_err(isp->dev, "Failed to power up ISP!.\n");
> > +		return -EINVAL;
> >  	}

-- 
With Best Regards,
Andy Shevchenko





[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