Message ID | 1348815695-8216-1-git-send-email-sachin.kamat@linaro.org |
---|---|
State | Accepted |
Headers | show |
Hi Sachin, Thank you for your patch, fixing this bug and testing suspend/resume. Best wishes, -- Kamil Debski Linux Platform Group Samsung Poland R&D Center > -----Original Message----- > From: Sachin Kamat [mailto:sachin.kamat@linaro.org] > Sent: 28 September 2012 09:02 > To: linux-media@vger.kernel.org > Cc: k.debski@samsung.com; s.nawrocki@samsung.com; sachin.kamat@linaro.org; > patches@linaro.org > Subject: [PATCH] [media] s5p-mfc: Fix misplaced return statement in > s5p_mfc_suspend() > > return statement was wrongly placed before a code that needs to be > executed. Moved the return statement to the end of the function. > > Tested suspend/resume on SMDK4412 board using 3.5-rc6 kernel. > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Kamil Debski <k.debski@samsung.com> > --- > drivers/media/platform/s5p-mfc/s5p_mfc.c | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c > b/drivers/media/platform/s5p-mfc/s5p_mfc.c > index e3e616d..e913a1c 100644 > --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c > +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c > @@ -1148,7 +1148,7 @@ static int s5p_mfc_suspend(struct device *dev) > > if (m_dev->num_inst == 0) > return 0; > - return s5p_mfc_sleep(m_dev); > + > if (test_and_set_bit(0, &m_dev->enter_suspend) != 0) { > mfc_err("Error: going to suspend for a second time\n"); > return -EIO; > @@ -1167,7 +1167,8 @@ static int s5p_mfc_suspend(struct device *dev) > return -EIO; > } > } > - return 0; > + > + return s5p_mfc_sleep(m_dev); > } > > static int s5p_mfc_resume(struct device *dev) > -- > 1.7.4.1
On 09/28/2012 11:21 AM, Kamil Debski wrote: >> -----Original Message----- >> From: Sachin Kamat [mailto:sachin.kamat@linaro.org] >> Sent: 28 September 2012 09:02 >> To: linux-media@vger.kernel.org >> Cc: k.debski@samsung.com; s.nawrocki@samsung.com; sachin.kamat@linaro.org; >> patches@linaro.org >> Subject: [PATCH] [media] s5p-mfc: Fix misplaced return statement in >> s5p_mfc_suspend() >> >> return statement was wrongly placed before a code that needs to be >> executed. Moved the return statement to the end of the function. >> >> Tested suspend/resume on SMDK4412 board using 3.5-rc6 kernel. >> >> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> > > Acked-by: Kamil Debski <k.debski@samsung.com> Applied, thank you.
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index e3e616d..e913a1c 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1148,7 +1148,7 @@ static int s5p_mfc_suspend(struct device *dev) if (m_dev->num_inst == 0) return 0; - return s5p_mfc_sleep(m_dev); + if (test_and_set_bit(0, &m_dev->enter_suspend) != 0) { mfc_err("Error: going to suspend for a second time\n"); return -EIO; @@ -1167,7 +1167,8 @@ static int s5p_mfc_suspend(struct device *dev) return -EIO; } } - return 0; + + return s5p_mfc_sleep(m_dev); } static int s5p_mfc_resume(struct device *dev)
return statement was wrongly placed before a code that needs to be executed. Moved the return statement to the end of the function. Tested suspend/resume on SMDK4412 board using 3.5-rc6 kernel. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)