diff options
Diffstat (limited to 'drivers/media/video/sh_mobile_ceu_camera.c')
| -rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 9a2586b07a0..ddcb81d0b81 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
| @@ -603,21 +603,18 @@ static int sh_mobile_ceu_set_fmt(struct soc_camera_device *icd, | |||
| 603 | const struct soc_camera_format_xlate *xlate; | 603 | const struct soc_camera_format_xlate *xlate; |
| 604 | int ret; | 604 | int ret; |
| 605 | 605 | ||
| 606 | if (!pixfmt) | ||
| 607 | return icd->ops->set_fmt(icd, pixfmt, rect); | ||
| 608 | |||
| 606 | xlate = soc_camera_xlate_by_fourcc(icd, pixfmt); | 609 | xlate = soc_camera_xlate_by_fourcc(icd, pixfmt); |
| 607 | if (!xlate) { | 610 | if (!xlate) { |
| 608 | dev_warn(&ici->dev, "Format %x not found\n", pixfmt); | 611 | dev_warn(&ici->dev, "Format %x not found\n", pixfmt); |
| 609 | return -EINVAL; | 612 | return -EINVAL; |
| 610 | } | 613 | } |
| 611 | 614 | ||
| 612 | switch (pixfmt) { | 615 | ret = icd->ops->set_fmt(icd, xlate->cam_fmt->fourcc, rect); |
| 613 | case 0: /* Only geometry change */ | ||
| 614 | ret = icd->ops->set_fmt(icd, pixfmt, rect); | ||
| 615 | break; | ||
| 616 | default: | ||
| 617 | ret = icd->ops->set_fmt(icd, xlate->cam_fmt->fourcc, rect); | ||
| 618 | } | ||
| 619 | 616 | ||
| 620 | if (pixfmt && !ret) { | 617 | if (!ret) { |
| 621 | icd->buswidth = xlate->buswidth; | 618 | icd->buswidth = xlate->buswidth; |
| 622 | icd->current_fmt = xlate->host_fmt; | 619 | icd->current_fmt = xlate->host_fmt; |
| 623 | pcdev->camera_fmt = xlate->cam_fmt; | 620 | pcdev->camera_fmt = xlate->cam_fmt; |
