Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303708
b: refs/heads/master
c: 1b6d823
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed May 2, 2012
1 parent 7650baa commit 8701c77
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 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: 167e4925e91119ea9ede429b87aab214fa5dc184
refs/heads/master: 1b6d8232586e4c144f5e90ab9606884dcf62c18f
19 changes: 8 additions & 11 deletions trunk/drivers/usb/image/mdc800.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,32 +284,30 @@ static void mdc800_usb_irq (struct urb *urb)
int data_received=0, wake_up;
unsigned char* b=urb->transfer_buffer;
struct mdc800_data* mdc800=urb->context;
struct device *dev = &mdc800->dev->dev;
int status = urb->status;

if (status >= 0) {

//dbg ("%i %i %i %i %i %i %i %i \n",b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7]);

if (mdc800_isBusy (b))
{
if (!mdc800->camera_busy)
{
mdc800->camera_busy=1;
dbg ("gets busy");
dev_dbg(dev, "gets busy\n");
}
}
else
{
if (mdc800->camera_busy && mdc800_isReady (b))
{
mdc800->camera_busy=0;
dbg ("gets ready");
dev_dbg(dev, "gets ready\n");
}
}
if (!(mdc800_isBusy (b) || mdc800_isReady (b)))
{
/* Store Data in camera_answer field */
dbg ("%i %i %i %i %i %i %i %i ",b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7]);
dev_dbg(dev, "%i %i %i %i %i %i %i %i \n",b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7]);

memcpy (mdc800->camera_response,b,8);
data_received=1;
Expand Down Expand Up @@ -441,7 +439,7 @@ static int mdc800_usb_probe (struct usb_interface *intf,
int irq_interval=0;
int retval;

dbg ("(mdc800_usb_probe) called.");
dev_dbg(&intf->dev, "(%s) called.\n", __func__);


if (mdc800->dev != NULL)
Expand Down Expand Up @@ -554,7 +552,7 @@ static void mdc800_usb_disconnect (struct usb_interface *intf)
{
struct mdc800_data* mdc800 = usb_get_intfdata(intf);

dbg ("(mdc800_usb_disconnect) called");
dev_dbg(&intf->dev, "(%s) called\n", __func__);

if (mdc800) {
if (mdc800->state == NOT_CONNECTED)
Expand Down Expand Up @@ -656,7 +654,7 @@ static int mdc800_device_open (struct inode* inode, struct file *file)
}

mdc800->open=1;
dbg ("Mustek MDC800 device opened.");
dev_dbg(&mdc800->dev->dev, "Mustek MDC800 device opened.\n");

error_out:
mutex_unlock(&mdc800->io_lock);
Expand All @@ -670,7 +668,6 @@ static int mdc800_device_open (struct inode* inode, struct file *file)
static int mdc800_device_release (struct inode* inode, struct file *file)
{
int retval=0;
dbg ("Mustek MDC800 device closed.");

mutex_lock(&mdc800->io_lock);
if (mdc800->open && (mdc800->state != NOT_CONNECTED))
Expand Down Expand Up @@ -927,7 +924,7 @@ static ssize_t mdc800_device_write (struct file *file, const char __user *buf, s
{
mdc800->pic_len=(int) 65536*(unsigned char) mdc800->camera_response[0]+256*(unsigned char) mdc800->camera_response[1]+(unsigned char) mdc800->camera_response[2];

dbg ("cached imagesize = %i",mdc800->pic_len);
dev_dbg(&mdc800->dev->dev, "cached imagesize = %i\n", mdc800->pic_len);
}

}
Expand Down

0 comments on commit 8701c77

Please sign in to comment.