On Wed, Mar 15, 2017 at 02:09:19PM -0400, Jérémy Lefaure wrote:
> The function atomisp_restore_iumit_reg is unused when PM is disabled.
> Adding __maybe_unused to the function definition avoids a warning.
> 
> During a reset (atomisp_reset), PM functions atomisp_runtime_suspend,
> atomisp_mrfld_power_down, atomisp_mrfld_power_up and
> atomisp_runtime_resume should be called only if PM is enabled.
> 
> Same thing apply in atomisp_pci_probe: atomis_mrfld_power_down should be
> called only if PM is enabled.
> 
> Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr>
> ---
>  .../media/atomisp/pci/atomisp2/atomisp_cmd.c       | 30 
> +++++++++++++---------
>  .../media/atomisp/pci/atomisp2/atomisp_v4l2.c      |  4 +--
>  2 files changed, 20 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c 
> b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
> index 1ee99d0..38e4bb3 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
> @@ -358,20 +358,26 @@ int atomisp_reset(struct atomisp_device *isp)
>  
>       dev_dbg(isp->dev, "%s\n", __func__);
>       atomisp_css_suspend(isp);
> -     ret = atomisp_runtime_suspend(isp->dev);
> -     if (ret < 0)
> -             dev_err(isp->dev, "atomisp_runtime_suspend failed, %d\n", ret);
> -     ret = atomisp_mrfld_power_down(isp);
> -     if (ret < 0) {
> -             dev_err(isp->dev, "can not disable ISP power\n");
> -     } else {
> -             ret = atomisp_mrfld_power_up(isp);
> -             if (ret < 0)
> -                     dev_err(isp->dev, "can not enable ISP power\n");
> -             ret = atomisp_runtime_resume(isp->dev);
> +
> +     if (IS_ENABLED(CONFI_PM)) {

I don't think you tested this :(

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to