aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/omap1_camera.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-03-28 07:03:58 -0400
committerTakashi Iwai <tiwai@suse.de>2011-03-28 07:03:58 -0400
commitcdccfc8dc0bf62a1da327324a8d639139acc9279 (patch)
treedca7934b27d510c9c006558979ebc48e07a531cf /drivers/media/video/omap1_camera.c
parentb21a8ee67013372f439fbd1591e91d09de49bb9c (diff)
parentc6b358748e19ce7e230b0926ac42696bc485a562 (diff)
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'drivers/media/video/omap1_camera.c')
-rw-r--r--drivers/media/video/omap1_camera.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/drivers/media/video/omap1_camera.c b/drivers/media/video/omap1_camera.c
index 0a2fb2bfdbfb..eab31cbd68eb 100644
--- a/drivers/media/video/omap1_camera.c
+++ b/drivers/media/video/omap1_camera.c
@@ -811,8 +811,8 @@ static irqreturn_t cam_isr(int irq, void *data)
811 spin_lock_irqsave(&pcdev->lock, flags); 811 spin_lock_irqsave(&pcdev->lock, flags);
812 812
813 if (WARN_ON(!buf)) { 813 if (WARN_ON(!buf)) {
814 dev_warn(dev, "%s: unhandled camera interrupt, status == " 814 dev_warn(dev, "%s: unhandled camera interrupt, status == %#x\n",
815 "%#x\n", __func__, it_status); 815 __func__, it_status);
816 suspend_capture(pcdev); 816 suspend_capture(pcdev);
817 disable_capture(pcdev); 817 disable_capture(pcdev);
818 goto out; 818 goto out;
@@ -1088,15 +1088,15 @@ static int omap1_cam_get_formats(struct soc_camera_device *icd,
1088 xlate->host_fmt = &omap1_cam_formats[code]; 1088 xlate->host_fmt = &omap1_cam_formats[code];
1089 xlate->code = code; 1089 xlate->code = code;
1090 xlate++; 1090 xlate++;
1091 dev_dbg(dev, "%s: providing format %s " 1091 dev_dbg(dev,
1092 "as byte swapped code #%d\n", __func__, 1092 "%s: providing format %s as byte swapped code #%d\n",
1093 omap1_cam_formats[code].name, code); 1093 __func__, omap1_cam_formats[code].name, code);
1094 } 1094 }
1095 default: 1095 default:
1096 if (xlate) 1096 if (xlate)
1097 dev_dbg(dev, "%s: providing format %s " 1097 dev_dbg(dev,
1098 "in pass-through mode\n", __func__, 1098 "%s: providing format %s in pass-through mode\n",
1099 fmt->name); 1099 __func__, fmt->name);
1100 } 1100 }
1101 formats++; 1101 formats++;
1102 if (xlate) { 1102 if (xlate) {
@@ -1139,29 +1139,29 @@ static int dma_align(int *width, int *height,
1139 return 1; 1139 return 1;
1140} 1140}
1141 1141
1142#define subdev_call_with_sense(pcdev, dev, icd, sd, function, args...) \ 1142#define subdev_call_with_sense(pcdev, dev, icd, sd, function, args...) \
1143({ \ 1143({ \
1144 struct soc_camera_sense sense = { \ 1144 struct soc_camera_sense sense = { \
1145 .master_clock = pcdev->camexclk, \ 1145 .master_clock = pcdev->camexclk, \
1146 .pixel_clock_max = 0, \ 1146 .pixel_clock_max = 0, \
1147 }; \ 1147 }; \
1148 int __ret; \ 1148 int __ret; \
1149 \ 1149 \
1150 if (pcdev->pdata) \ 1150 if (pcdev->pdata) \
1151 sense.pixel_clock_max = pcdev->pdata->lclk_khz_max * 1000; \ 1151 sense.pixel_clock_max = pcdev->pdata->lclk_khz_max * 1000; \
1152 icd->sense = &sense; \ 1152 icd->sense = &sense; \
1153 __ret = v4l2_subdev_call(sd, video, function, ##args); \ 1153 __ret = v4l2_subdev_call(sd, video, function, ##args); \
1154 icd->sense = NULL; \ 1154 icd->sense = NULL; \
1155 \ 1155 \
1156 if (sense.flags & SOCAM_SENSE_PCLK_CHANGED) { \ 1156 if (sense.flags & SOCAM_SENSE_PCLK_CHANGED) { \
1157 if (sense.pixel_clock > sense.pixel_clock_max) { \ 1157 if (sense.pixel_clock > sense.pixel_clock_max) { \
1158 dev_err(dev, "%s: pixel clock %lu " \ 1158 dev_err(dev, \
1159 "set by the camera too high!\n", \ 1159 "%s: pixel clock %lu set by the camera too high!\n", \
1160 __func__, sense.pixel_clock); \ 1160 __func__, sense.pixel_clock); \
1161 __ret = -EINVAL; \ 1161 __ret = -EINVAL; \
1162 } \ 1162 } \
1163 } \ 1163 } \
1164 __ret; \ 1164 __ret; \
1165}) 1165})
1166 1166
1167static int set_mbus_format(struct omap1_cam_dev *pcdev, struct device *dev, 1167static int set_mbus_format(struct omap1_cam_dev *pcdev, struct device *dev,
@@ -1664,10 +1664,10 @@ static int __exit omap1_cam_remove(struct platform_device *pdev)
1664 res = pcdev->res; 1664 res = pcdev->res;
1665 release_mem_region(res->start, resource_size(res)); 1665 release_mem_region(res->start, resource_size(res));
1666 1666
1667 kfree(pcdev);
1668
1669 clk_put(pcdev->clk); 1667 clk_put(pcdev->clk);
1670 1668
1669 kfree(pcdev);
1670
1671 dev_info(&pdev->dev, "OMAP1 Camera Interface driver unloaded\n"); 1671 dev_info(&pdev->dev, "OMAP1 Camera Interface driver unloaded\n");
1672 1672
1673 return 0; 1673 return 0;