Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349041
b: refs/heads/master
c: 5e30bbb
h: refs/heads/master
i:
  349039: b4a3451
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 23, 2013
1 parent 0fe22aa commit 29e357a
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 58 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2116e02a96b44be4d7c82a067554de321c87afe8
refs/heads/master: 5e30bbb723415fb94a098e314d1908a39a7e50a2
2 changes: 2 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6585,7 +6585,9 @@ F: drivers/media/platform/s3c-camif/
F: include/media/s3c_camif.h

SERIAL DRIVERS
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
L: linux-serial@vger.kernel.org
S: Maintained
F: drivers/tty/serial

SYNOPSYS DESIGNWARE DMAC DRIVER
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/m5mols/m5mols_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ static int m5mols_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
mutex_lock(&info->lock);

format = __find_format(info, fh, fmt->which, info->res_type);
if (format)
if (!format)
fmt->format = *format;
else
ret = -EINVAL;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/platform/omap3isp/ispvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#include <linux/vmalloc.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-ioctl.h>
#include <plat/iommu.h>
#include <plat/iovmm.h>
#include <plat/omap-pm.h>

#include "ispvideo.h"
#include "isp.h"
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/platform/s5p-fimc/fimc-mdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ static int __fimc_md_create_flite_source_links(struct fimc_md *fmd)
{
struct media_entity *source, *sink;
unsigned int flags = MEDIA_LNK_FL_ENABLED;
int i, ret = 0;
int i, ret;

for (i = 0; i < FIMC_LITE_MAX_DEVS; i++) {
struct fimc_lite *fimc = fmd->fimc_lite[i];
Expand Down
88 changes: 51 additions & 37 deletions trunk/drivers/media/platform/s5p-mfc/s5p_mfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,48 +412,62 @@ static void s5p_mfc_handle_frame(struct s5p_mfc_ctx *ctx,
}

/* Error handling for interrupt */
static void s5p_mfc_handle_error(struct s5p_mfc_dev *dev,
struct s5p_mfc_ctx *ctx, unsigned int reason, unsigned int err)
static void s5p_mfc_handle_error(struct s5p_mfc_ctx *ctx,
unsigned int reason, unsigned int err)
{
struct s5p_mfc_dev *dev;
unsigned long flags;

mfc_err("Interrupt Error: %08x\n", err);
/* If no context is available then all necessary
* processing has been done. */
if (ctx == NULL)
return;

if (ctx != NULL) {
/* Error recovery is dependent on the state of context */
switch (ctx->state) {
case MFCINST_RES_CHANGE_INIT:
case MFCINST_RES_CHANGE_FLUSH:
case MFCINST_RES_CHANGE_END:
case MFCINST_FINISHING:
case MFCINST_FINISHED:
case MFCINST_RUNNING:
/* It is higly probable that an error occured
* while decoding a frame */
clear_work_bit(ctx);
ctx->state = MFCINST_ERROR;
/* Mark all dst buffers as having an error */
spin_lock_irqsave(&dev->irqlock, flags);
s5p_mfc_hw_call(dev->mfc_ops, cleanup_queue,
&ctx->dst_queue, &ctx->vq_dst);
/* Mark all src buffers as having an error */
s5p_mfc_hw_call(dev->mfc_ops, cleanup_queue,
&ctx->src_queue, &ctx->vq_src);
spin_unlock_irqrestore(&dev->irqlock, flags);
wake_up_ctx(ctx, reason, err);
break;
default:
clear_work_bit(ctx);
ctx->state = MFCINST_ERROR;
wake_up_ctx(ctx, reason, err);
break;
}
}
if (test_and_clear_bit(0, &dev->hw_lock) == 0)
BUG();
dev = ctx->dev;
mfc_err("Interrupt Error: %08x\n", err);
s5p_mfc_hw_call(dev->mfc_ops, clear_int_flags, dev);
s5p_mfc_clock_off();
wake_up_dev(dev, reason, err);

/* Error recovery is dependent on the state of context */
switch (ctx->state) {
case MFCINST_INIT:
/* This error had to happen while acquireing instance */
case MFCINST_GOT_INST:
/* This error had to happen while parsing the header */
case MFCINST_HEAD_PARSED:
/* This error had to happen while setting dst buffers */
case MFCINST_RETURN_INST:
/* This error had to happen while releasing instance */
clear_work_bit(ctx);
wake_up_ctx(ctx, reason, err);
if (test_and_clear_bit(0, &dev->hw_lock) == 0)
BUG();
s5p_mfc_clock_off();
ctx->state = MFCINST_ERROR;
break;
case MFCINST_FINISHING:
case MFCINST_FINISHED:
case MFCINST_RUNNING:
/* It is higly probable that an error occured
* while decoding a frame */
clear_work_bit(ctx);
ctx->state = MFCINST_ERROR;
/* Mark all dst buffers as having an error */
spin_lock_irqsave(&dev->irqlock, flags);
s5p_mfc_hw_call(dev->mfc_ops, cleanup_queue, &ctx->dst_queue,
&ctx->vq_dst);
/* Mark all src buffers as having an error */
s5p_mfc_hw_call(dev->mfc_ops, cleanup_queue, &ctx->src_queue,
&ctx->vq_src);
spin_unlock_irqrestore(&dev->irqlock, flags);
if (test_and_clear_bit(0, &dev->hw_lock) == 0)
BUG();
s5p_mfc_clock_off();
break;
default:
mfc_err("Encountered an error interrupt which had not been handled\n");
break;
}
return;
}

Expand Down Expand Up @@ -618,7 +632,7 @@ static irqreturn_t s5p_mfc_irq(int irq, void *priv)
dev->warn_start)
s5p_mfc_handle_frame(ctx, reason, err);
else
s5p_mfc_handle_error(dev, ctx, reason, err);
s5p_mfc_handle_error(ctx, reason, err);
clear_bit(0, &dev->enter_suspend);
break;

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/media/usb/gspca/kinect.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ static const struct sd_desc sd_desc = {
/* -- module initialisation -- */
static const struct usb_device_id device_table[] = {
{USB_DEVICE(0x045e, 0x02ae)},
{USB_DEVICE(0x045e, 0x02bf)},
{}
};

Expand Down
13 changes: 5 additions & 8 deletions trunk/drivers/media/usb/gspca/sonixb.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,27 +496,24 @@ static void reg_w(struct gspca_dev *gspca_dev,
}
}

static void i2c_w(struct gspca_dev *gspca_dev, const u8 *buf)
static void i2c_w(struct gspca_dev *gspca_dev, const __u8 *buffer)
{
int retry = 60;

if (gspca_dev->usb_err < 0)
return;

/* is i2c ready */
reg_w(gspca_dev, 0x08, buf, 8);
reg_w(gspca_dev, 0x08, buffer, 8);
while (retry--) {
if (gspca_dev->usb_err < 0)
return;
msleep(1);
msleep(10);
reg_r(gspca_dev, 0x08);
if (gspca_dev->usb_buf[0] & 0x04) {
if (gspca_dev->usb_buf[0] & 0x08) {
dev_err(gspca_dev->v4l2_dev.dev,
"i2c error writing %02x %02x %02x %02x"
" %02x %02x %02x %02x\n",
buf[0], buf[1], buf[2], buf[3],
buf[4], buf[5], buf[6], buf[7]);
"i2c write error\n");
gspca_dev->usb_err = -EIO;
}
return;
Expand All @@ -533,7 +530,7 @@ static void i2c_w_vector(struct gspca_dev *gspca_dev,
for (;;) {
if (gspca_dev->usb_err < 0)
return;
i2c_w(gspca_dev, *buffer);
reg_w(gspca_dev, 0x08, *buffer, 8);
len -= 8;
if (len <= 0)
break;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/media/usb/gspca/sonixj.c
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,6 @@ static void i2c_w1(struct gspca_dev *gspca_dev, u8 reg, u8 val)
0,
gspca_dev->usb_buf, 8,
500);
msleep(2);
if (ret < 0) {
pr_err("i2c_w1 err %d\n", ret);
gspca_dev->usb_err = ret;
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/media/usb/uvc/uvc_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,10 +1431,8 @@ int uvc_ctrl_set(struct uvc_video_chain *chain,
int ret;

ctrl = uvc_find_control(chain, xctrl->id, &mapping);
if (ctrl == NULL)
if (ctrl == NULL || (ctrl->info.flags & UVC_CTRL_FLAG_SET_CUR) == 0)
return -EINVAL;
if (!(ctrl->info.flags & UVC_CTRL_FLAG_SET_CUR))
return -EACCES;

/* Clamp out of range values. */
switch (mapping->v4l2_type) {
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/media/usb/uvc/uvc_v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
ret = uvc_ctrl_get(chain, ctrl);
if (ret < 0) {
uvc_ctrl_rollback(handle);
ctrls->error_idx = i;
ctrls->error_idx = ret == -ENOENT
? ctrls->count : i;
return ret;
}
}
Expand Down Expand Up @@ -685,7 +686,8 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
ret = uvc_ctrl_set(chain, ctrl);
if (ret < 0) {
uvc_ctrl_rollback(handle);
ctrls->error_idx = cmd == VIDIOC_S_EXT_CTRLS
ctrls->error_idx = (ret == -ENOENT &&
cmd == VIDIOC_S_EXT_CTRLS)
? ctrls->count : i;
return ret;
}
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/media/v4l2-core/videobuf2-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,10 +921,8 @@ static void __fill_vb2_buffer(struct vb2_buffer *vb, const struct v4l2_buffer *b
* In videobuf we use our internal V4l2_planes struct for
* single-planar buffers as well, for simplicity.
*/
if (V4L2_TYPE_IS_OUTPUT(b->type)) {
if (V4L2_TYPE_IS_OUTPUT(b->type))
v4l2_planes[0].bytesused = b->bytesused;
v4l2_planes[0].data_offset = 0;
}

if (b->memory == V4L2_MEMORY_USERPTR) {
v4l2_planes[0].m.userptr = b->m.userptr;
Expand Down

0 comments on commit 29e357a

Please sign in to comment.