Commit 353c2129 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab

[media] V4L: omap1_camera: join split format lines

Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a48be1d6
...@@ -811,8 +811,8 @@ static irqreturn_t cam_isr(int irq, void *data) ...@@ -811,8 +811,8 @@ static irqreturn_t cam_isr(int irq, void *data)
spin_lock_irqsave(&pcdev->lock, flags); spin_lock_irqsave(&pcdev->lock, flags);
if (WARN_ON(!buf)) { if (WARN_ON(!buf)) {
dev_warn(dev, "%s: unhandled camera interrupt, status == " dev_warn(dev, "%s: unhandled camera interrupt, status == %#x\n",
"%#x\n", __func__, it_status); __func__, it_status);
suspend_capture(pcdev); suspend_capture(pcdev);
disable_capture(pcdev); disable_capture(pcdev);
goto out; goto out;
...@@ -1088,15 +1088,15 @@ static int omap1_cam_get_formats(struct soc_camera_device *icd, ...@@ -1088,15 +1088,15 @@ static int omap1_cam_get_formats(struct soc_camera_device *icd,
xlate->host_fmt = &omap1_cam_formats[code]; xlate->host_fmt = &omap1_cam_formats[code];
xlate->code = code; xlate->code = code;
xlate++; xlate++;
dev_dbg(dev, "%s: providing format %s " dev_dbg(dev,
"as byte swapped code #%d\n", __func__, "%s: providing format %s as byte swapped code #%d\n",
omap1_cam_formats[code].name, code); __func__, omap1_cam_formats[code].name, code);
} }
default: default:
if (xlate) if (xlate)
dev_dbg(dev, "%s: providing format %s " dev_dbg(dev,
"in pass-through mode\n", __func__, "%s: providing format %s in pass-through mode\n",
fmt->name); __func__, fmt->name);
} }
formats++; formats++;
if (xlate) { if (xlate) {
...@@ -1139,29 +1139,29 @@ static int dma_align(int *width, int *height, ...@@ -1139,29 +1139,29 @@ static int dma_align(int *width, int *height,
return 1; return 1;
} }
#define subdev_call_with_sense(pcdev, dev, icd, sd, function, args...) \ #define subdev_call_with_sense(pcdev, dev, icd, sd, function, args...) \
({ \ ({ \
struct soc_camera_sense sense = { \ struct soc_camera_sense sense = { \
.master_clock = pcdev->camexclk, \ .master_clock = pcdev->camexclk, \
.pixel_clock_max = 0, \ .pixel_clock_max = 0, \
}; \ }; \
int __ret; \ int __ret; \
\ \
if (pcdev->pdata) \ if (pcdev->pdata) \
sense.pixel_clock_max = pcdev->pdata->lclk_khz_max * 1000; \ sense.pixel_clock_max = pcdev->pdata->lclk_khz_max * 1000; \
icd->sense = &sense; \ icd->sense = &sense; \
__ret = v4l2_subdev_call(sd, video, function, ##args); \ __ret = v4l2_subdev_call(sd, video, function, ##args); \
icd->sense = NULL; \ icd->sense = NULL; \
\ \
if (sense.flags & SOCAM_SENSE_PCLK_CHANGED) { \ if (sense.flags & SOCAM_SENSE_PCLK_CHANGED) { \
if (sense.pixel_clock > sense.pixel_clock_max) { \ if (sense.pixel_clock > sense.pixel_clock_max) { \
dev_err(dev, "%s: pixel clock %lu " \ dev_err(dev, \
"set by the camera too high!\n", \ "%s: pixel clock %lu set by the camera too high!\n", \
__func__, sense.pixel_clock); \ __func__, sense.pixel_clock); \
__ret = -EINVAL; \ __ret = -EINVAL; \
} \ } \
} \ } \
__ret; \ __ret; \
}) })
static int set_mbus_format(struct omap1_cam_dev *pcdev, struct device *dev, static int set_mbus_format(struct omap1_cam_dev *pcdev, struct device *dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment