sq905c.c (0337966d121ebebf73a1c346123e8112796e684e) | sq905c.c (52173c5f3f6476eb9100691ec47b10d6740eed4a) |
---|---|
1/* 2 * SQ905C subdriver 3 * 4 * Copyright (C) 2009 Theodore Kilgore 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 197 unchanged lines hidden (view full) --- 206 int ret; 207 208 PDEBUG(D_PROBE, 209 "SQ9050 camera detected (vid/pid 0x%04X:0x%04X)", 210 id->idVendor, id->idProduct); 211 212 ret = sq905c_command(gspca_dev, SQ905C_GET_ID, 0); 213 if (ret < 0) { | 1/* 2 * SQ905C subdriver 3 * 4 * Copyright (C) 2009 Theodore Kilgore 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 197 unchanged lines hidden (view full) --- 206 int ret; 207 208 PDEBUG(D_PROBE, 209 "SQ9050 camera detected (vid/pid 0x%04X:0x%04X)", 210 id->idVendor, id->idProduct); 211 212 ret = sq905c_command(gspca_dev, SQ905C_GET_ID, 0); 213 if (ret < 0) { |
214 PERR("Get version command failed"); | 214 gspca_err(gspca_dev, "Get version command failed\n"); |
215 return ret; 216 } 217 218 ret = sq905c_read(gspca_dev, 0xf5, 0, 20); 219 if (ret < 0) { | 215 return ret; 216 } 217 218 ret = sq905c_read(gspca_dev, 0xf5, 0, 20); 219 if (ret < 0) { |
220 PERR("Reading version command failed"); | 220 gspca_err(gspca_dev, "Reading version command failed\n"); |
221 return ret; 222 } 223 /* Note we leave out the usb id and the manufacturing date */ 224 PDEBUG(D_PROBE, 225 "SQ9050 ID string: %02x - %*ph", 226 gspca_dev->usb_buf[3], 6, gspca_dev->usb_buf + 14); 227 228 cam->cam_mode = sq905c_mode; --- 45 unchanged lines hidden (view full) --- 274 break; 275 default: /* 320 */ 276 PDEBUG(D_STREAM, "Start streaming at medium resolution"); 277 ret = sq905c_command(gspca_dev, SQ905C_CAPTURE_MED, 278 SQ905C_CAPTURE_INDEX); 279 } 280 281 if (ret < 0) { | 221 return ret; 222 } 223 /* Note we leave out the usb id and the manufacturing date */ 224 PDEBUG(D_PROBE, 225 "SQ9050 ID string: %02x - %*ph", 226 gspca_dev->usb_buf[3], 6, gspca_dev->usb_buf + 14); 227 228 cam->cam_mode = sq905c_mode; --- 45 unchanged lines hidden (view full) --- 274 break; 275 default: /* 320 */ 276 PDEBUG(D_STREAM, "Start streaming at medium resolution"); 277 ret = sq905c_command(gspca_dev, SQ905C_CAPTURE_MED, 278 SQ905C_CAPTURE_INDEX); 279 } 280 281 if (ret < 0) { |
282 PERR("Start streaming command failed"); | 282 gspca_err(gspca_dev, "Start streaming command failed\n"); |
283 return ret; 284 } 285 /* Start the workqueue function to do the streaming */ 286 dev->work_thread = create_singlethread_workqueue(MODULE_NAME); 287 queue_work(dev->work_thread, &dev->work_struct); 288 289 return 0; 290} --- 45 unchanged lines hidden --- | 283 return ret; 284 } 285 /* Start the workqueue function to do the streaming */ 286 dev->work_thread = create_singlethread_workqueue(MODULE_NAME); 287 queue_work(dev->work_thread, &dev->work_struct); 288 289 return 0; 290} --- 45 unchanged lines hidden --- |