diff options
Diffstat (limited to 'drivers/media/video/mx3_camera.c')
-rw-r--r-- | drivers/media/video/mx3_camera.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index 8630c0c9e60a..3e5435b539ba 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c | |||
@@ -756,8 +756,10 @@ static void configure_geometry(struct mx3_camera_dev *mx3_cam, | |||
756 | * the width parameter count the number of samples to | 756 | * the width parameter count the number of samples to |
757 | * capture to complete the whole image width. | 757 | * capture to complete the whole image width. |
758 | */ | 758 | */ |
759 | width *= soc_mbus_samples_per_pixel(fmt); | 759 | unsigned int num, den; |
760 | BUG_ON(width < 0); | 760 | int ret = soc_mbus_samples_per_pixel(fmt, &num, &den); |
761 | BUG_ON(ret < 0); | ||
762 | width = width * num / den; | ||
761 | } | 763 | } |
762 | 764 | ||
763 | /* Setup frame size - this cannot be changed on-the-fly... */ | 765 | /* Setup frame size - this cannot be changed on-the-fly... */ |