aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 00:33:50 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 00:33:50 -0400
commit1b6d8232586e4c144f5e90ab9606884dcf62c18f (patch)
tree1d1864633368a1e32a97665810f19e4dbb33006d
parent167e4925e91119ea9ede429b87aab214fa5dc184 (diff)
USB: mdc800.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/image/mdc800.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index 575b56c79e9..7121b50098d 100644
--- a/drivers/usb/image/mdc800.c
+++ b/drivers/usb/image/mdc800.c
@@ -284,18 +284,16 @@ static void mdc800_usb_irq (struct urb *urb)
284 int data_received=0, wake_up; 284 int data_received=0, wake_up;
285 unsigned char* b=urb->transfer_buffer; 285 unsigned char* b=urb->transfer_buffer;
286 struct mdc800_data* mdc800=urb->context; 286 struct mdc800_data* mdc800=urb->context;
287 struct device *dev = &mdc800->dev->dev;
287 int status = urb->status; 288 int status = urb->status;
288 289
289 if (status >= 0) { 290 if (status >= 0) {
290
291 //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]);
292
293 if (mdc800_isBusy (b)) 291 if (mdc800_isBusy (b))
294 { 292 {
295 if (!mdc800->camera_busy) 293 if (!mdc800->camera_busy)
296 { 294 {
297 mdc800->camera_busy=1; 295 mdc800->camera_busy=1;
298 dbg ("gets busy"); 296 dev_dbg(dev, "gets busy\n");
299 } 297 }
300 } 298 }
301 else 299 else
@@ -303,13 +301,13 @@ static void mdc800_usb_irq (struct urb *urb)
303 if (mdc800->camera_busy && mdc800_isReady (b)) 301 if (mdc800->camera_busy && mdc800_isReady (b))
304 { 302 {
305 mdc800->camera_busy=0; 303 mdc800->camera_busy=0;
306 dbg ("gets ready"); 304 dev_dbg(dev, "gets ready\n");
307 } 305 }
308 } 306 }
309 if (!(mdc800_isBusy (b) || mdc800_isReady (b))) 307 if (!(mdc800_isBusy (b) || mdc800_isReady (b)))
310 { 308 {
311 /* Store Data in camera_answer field */ 309 /* Store Data in camera_answer field */
312 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]); 310 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]);
313 311
314 memcpy (mdc800->camera_response,b,8); 312 memcpy (mdc800->camera_response,b,8);
315 data_received=1; 313 data_received=1;
@@ -441,7 +439,7 @@ static int mdc800_usb_probe (struct usb_interface *intf,
441 int irq_interval=0; 439 int irq_interval=0;
442 int retval; 440 int retval;
443 441
444 dbg ("(mdc800_usb_probe) called."); 442 dev_dbg(&intf->dev, "(%s) called.\n", __func__);
445 443
446 444
447 if (mdc800->dev != NULL) 445 if (mdc800->dev != NULL)
@@ -554,7 +552,7 @@ static void mdc800_usb_disconnect (struct usb_interface *intf)
554{ 552{
555 struct mdc800_data* mdc800 = usb_get_intfdata(intf); 553 struct mdc800_data* mdc800 = usb_get_intfdata(intf);
556 554
557 dbg ("(mdc800_usb_disconnect) called"); 555 dev_dbg(&intf->dev, "(%s) called\n", __func__);
558 556
559 if (mdc800) { 557 if (mdc800) {
560 if (mdc800->state == NOT_CONNECTED) 558 if (mdc800->state == NOT_CONNECTED)
@@ -656,7 +654,7 @@ static int mdc800_device_open (struct inode* inode, struct file *file)
656 } 654 }
657 655
658 mdc800->open=1; 656 mdc800->open=1;
659 dbg ("Mustek MDC800 device opened."); 657 dev_dbg(&mdc800->dev->dev, "Mustek MDC800 device opened.\n");
660 658
661error_out: 659error_out:
662 mutex_unlock(&mdc800->io_lock); 660 mutex_unlock(&mdc800->io_lock);
@@ -670,7 +668,6 @@ error_out:
670static int mdc800_device_release (struct inode* inode, struct file *file) 668static int mdc800_device_release (struct inode* inode, struct file *file)
671{ 669{
672 int retval=0; 670 int retval=0;
673 dbg ("Mustek MDC800 device closed.");
674 671
675 mutex_lock(&mdc800->io_lock); 672 mutex_lock(&mdc800->io_lock);
676 if (mdc800->open && (mdc800->state != NOT_CONNECTED)) 673 if (mdc800->open && (mdc800->state != NOT_CONNECTED))
@@ -927,7 +924,7 @@ static ssize_t mdc800_device_write (struct file *file, const char __user *buf, s
927 { 924 {
928 mdc800->pic_len=(int) 65536*(unsigned char) mdc800->camera_response[0]+256*(unsigned char) mdc800->camera_response[1]+(unsigned char) mdc800->camera_response[2]; 925 mdc800->pic_len=(int) 65536*(unsigned char) mdc800->camera_response[0]+256*(unsigned char) mdc800->camera_response[1]+(unsigned char) mdc800->camera_response[2];
929 926
930 dbg ("cached imagesize = %i",mdc800->pic_len); 927 dev_dbg(&mdc800->dev->dev, "cached imagesize = %i\n", mdc800->pic_len);
931 } 928 }
932 929
933 } 930 }