diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2023-12-24 18:44:14 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-01-22 14:16:44 +0300 |
commit | c007ae835d3fccd5c85dab205918767a17040f2d (patch) | |
tree | f714c75a83240601ba97616a02da39cd4dbc99bd /drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c | |
parent | 9e1b5ab82171cb30b79e0fdb75f5d9612c686c53 (diff) | |
download | linux-c007ae835d3fccd5c85dab205918767a17040f2d.tar.xz |
media: s5p-mfc: drop static device variable in s5p_mfc_pm.c
Change the interface of power management functions in s5p_mfc_pm.c to
accept the pointer to S5P MFC device structure. instead of relying on
file-scope static variable. This makes code easier to read and modify
in case more devices are added.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c')
-rw-r--r-- | drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c index 345734a13d26..91e102d4ec4e 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c @@ -496,7 +496,7 @@ static int reqbufs_output(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx, { int ret = 0; - s5p_mfc_clock_on(); + s5p_mfc_clock_on(dev); if (reqbufs->count == 0) { mfc_debug(2, "Freeing buffers\n"); @@ -533,7 +533,7 @@ static int reqbufs_output(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx, ret = -EINVAL; } out: - s5p_mfc_clock_off(); + s5p_mfc_clock_off(dev); if (ret) mfc_err("Failed allocating buffers for OUTPUT queue\n"); return ret; @@ -544,7 +544,7 @@ static int reqbufs_capture(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx, { int ret = 0; - s5p_mfc_clock_on(); + s5p_mfc_clock_on(dev); if (reqbufs->count == 0) { mfc_debug(2, "Freeing buffers\n"); @@ -587,7 +587,7 @@ static int reqbufs_capture(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx, ret = -EINVAL; } out: - s5p_mfc_clock_off(); + s5p_mfc_clock_off(dev); if (ret) mfc_err("Failed allocating buffers for CAPTURE queue\n"); return ret; |