|
@@ -893,7 +893,7 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
|
|
unsigned long buffer, unsigned long size,
|
|
unsigned long buffer, unsigned long size,
|
|
struct s5p_jpeg_ctx *ctx)
|
|
struct s5p_jpeg_ctx *ctx)
|
|
{
|
|
{
|
|
- int c, components, notfound;
|
|
|
|
|
|
+ int c, components = 0, notfound;
|
|
unsigned int height, width, word, subsampling = 0;
|
|
unsigned int height, width, word, subsampling = 0;
|
|
long length;
|
|
long length;
|
|
struct s5p_jpeg_buffer jpeg_buffer;
|
|
struct s5p_jpeg_buffer jpeg_buffer;
|
|
@@ -2632,6 +2632,7 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
|
|
static int s5p_jpeg_runtime_suspend(struct device *dev)
|
|
static int s5p_jpeg_runtime_suspend(struct device *dev)
|
|
{
|
|
{
|
|
struct s5p_jpeg *jpeg = dev_get_drvdata(dev);
|
|
struct s5p_jpeg *jpeg = dev_get_drvdata(dev);
|
|
@@ -2681,7 +2682,9 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
+#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */
|
|
|
|
|
|
|
|
+#ifdef CONFIG_PM_SLEEP
|
|
static int s5p_jpeg_suspend(struct device *dev)
|
|
static int s5p_jpeg_suspend(struct device *dev)
|
|
{
|
|
{
|
|
if (pm_runtime_suspended(dev))
|
|
if (pm_runtime_suspended(dev))
|
|
@@ -2697,6 +2700,7 @@ static int s5p_jpeg_resume(struct device *dev)
|
|
|
|
|
|
return s5p_jpeg_runtime_resume(dev);
|
|
return s5p_jpeg_runtime_resume(dev);
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
static const struct dev_pm_ops s5p_jpeg_pm_ops = {
|
|
static const struct dev_pm_ops s5p_jpeg_pm_ops = {
|
|
SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume)
|
|
SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume)
|