From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1KwcYT-0003lH-Vt for garchives@archives.gentoo.org; Sun, 02 Nov 2008 12:59:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B1B11E0319; Sun, 2 Nov 2008 12:59:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 40DE3E0319 for ; Sun, 2 Nov 2008 12:59:46 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 8DB65649E1 for ; Sun, 2 Nov 2008 12:59:44 +0000 (UTC) Received: from coldwind by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1KwcYS-00050t-69 for gentoo-commits@lists.gentoo.org; Sun, 02 Nov 2008 12:59:44 +0000 From: "Santiago M. Mola (coldwind)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, coldwind@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in media-video/qc-usb-messenger/files: qc-usb-messenger-1.8-kcompat-2.6.26.patch X-VCS-Repository: gentoo-x86 X-VCS-Files: qc-usb-messenger-1.8-kcompat-2.6.26.patch X-VCS-Directories: media-video/qc-usb-messenger/files X-VCS-Committer: coldwind X-VCS-Committer-Name: Santiago M. Mola Content-Type: text/plain; charset=utf8 Message-Id: Sender: "Santiago M. Mola" Date: Sun, 02 Nov 2008 12:59:44 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 56990857-a347-4b48-a728-feb7967a95fa X-Archives-Hash: 33af958f430b3837de61ae98b00a17b4 coldwind 08/11/02 12:59:44 Added: qc-usb-messenger-1.8-kcompat-2.6.26.patch Log: Version bump, fix kernel 2.6.26 compatibility (bug #232700). Module is = now called qcmessenger. (Portage version: 2.2_rc12/cvs/Linux 2.6.27-gentoo-r1 x86_64) Revision Changes Path 1.1 media-video/qc-usb-messenger/files/qc-usb-messenger-= 1.8-kcompat-2.6.26.patch file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/qc-usb= -messenger/files/qc-usb-messenger-1.8-kcompat-2.6.26.patch?rev=3D1.1&view= =3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/qc-usb= -messenger/files/qc-usb-messenger-1.8-kcompat-2.6.26.patch?rev=3D1.1&cont= ent-type=3Dtext/plain Index: qc-usb-messenger-1.8-kcompat-2.6.26.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- qc-usb-messenger-1.8/qc-memory.c 2006-11-05 06:36:51.000000000 +0000 +++ qc-usb-messenger-1.8/qc-memory.c 2008-10-07 01:32:40.000000000 +0100 @@ -81,12 +81,14 @@ #define pte_offset(pmd,adr) pte_offset_map(pmd,adr) /* Emulation for a k= ernel using the new rmap-vm */ #endif /* Fix by Michele Balistreri */ =20 +#if LINUX_VERSION_CODE>=3DKERNEL_VERSION(2,5,3) && LINUX_VERSION_CODEmaxrawdatalen =3D 0; /* Hopefully stops all ongoing captures, migh= t need locking though */ wake_up(&fd->wq); if (qcdebug&QC_DEBUGFRAME) PDEBUG("waiting=3D%i",fd->waiting); - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_frame_exit() : %i", qc,= sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_frame_exit() : %i", qc,= 0); up(&qc->lock); /* The lock was down when entering this function */ while (fd->waiting > 0) { schedule(); @@ -1627,7 +1627,7 @@ } #endif } - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(%p) in qc_frame_exit() : %i", q= c, sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(%p) in qc_frame_exit() : %i", q= c, 0); down(&qc->lock); vfree(fd->rawdatabuf); POISON(fd->rawdatabuf); @@ -1656,14 +1656,14 @@ /* Wait until the next frame is available */ if (qcdebug&QC_DEBUGFRAME) PDEBUG("qc_frame_get/consume(qc=3D%p,tail=3D= %i,head=3D%i)",qc,fd->tail,fd->head); fd->waiting++; - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_frame_get() : %i", qc, = sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_frame_get() : %i", qc, = 0); up(&qc->lock); /* Release lock while waiting */ =20 ret =3D wait_event_interruptible(fd->wq, fd->head!=3Dfd->tail || fd->ex= iting); //FIXME:What if we get -ERESTARTSYS? if(ret =3D=3D -ERESTARTSYS) { PDEBUG("wait_event_interruptible() returned ERESTARTSYS"); } - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(%p) in qc_frame_get() : %i", qc= , sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(%p) in qc_frame_get() : %i", qc= , 0); down(&qc->lock); if (!ret) { if (!fd->exiting) { @@ -2685,12 +2685,12 @@ if (qcdebug&QC_DEBUGMUTEX) PDEBUG("MOD_INC_USE_COUNT in qc_v4l_open() := %i",GET_USE_COUNT(THIS_MODULE)); MOD_INC_USE_COUNT; =20 - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(quickcam_list) in qc_v4l_o= pen() : %i", sem_getcount(&quickcam_list_lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(quickcam_list) in qc_v4l_o= pen() : %i", 0); =20 r =3D qc_lock(qc); if (r<0) goto fail1; =20 - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(%p) in qc_v4l_open() : %i"= , qc, sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(%p) in qc_v4l_open() : %i"= , qc, 0); if (down_interruptible(&qc->lock)) { r =3D -ERESTARTSYS; goto fail2; @@ -2705,15 +2705,15 @@ if (qcdebug&QC_DEBUGLOGIC) PDEBUG("First user, initializing"); if ((r =3D qc_v4l_init(qc))<0) goto fail4; } - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_open() : %i",qc, se= m_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_open() : %i",qc, 0)= ; up(&qc->lock); up(&quickcam_list_lock); return 0; =20 fail4: qc->users--; -fail3: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_open()=3Dfail= ed : %i",qc, sem_getcount(&qc->lock)); +fail3: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_open()=3Dfail= ed : %i",qc, 0); up(&qc->lock); -fail2: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(quickcam_list) in qc_v4l_op= en()=3Dfailed : %i", sem_getcount(&qc->lock)); +fail2: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(quickcam_list) in qc_v4l_op= en()=3Dfailed : %i", 0); up(&quickcam_list_lock); fail1: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("MOD_DEC_USE_COUNT in qc_v4l_op= en() : %i",GET_USE_COUNT(THIS_MODULE)); MOD_DEC_USE_COUNT; @@ -2747,9 +2747,9 @@ #else TEST_BUG_MSG(qc=3D=3DNULL, "qc=3D=3DNULL"); #endif - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(quickcam_list) in qc_v4l_close(= ) : %i", sem_getcount(&quickcam_list_lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(quickcam_list) in qc_v4l_close(= ) : %i", 0); down(&quickcam_list_lock); /* Can not interrupt, we must success */ - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(%p) in qc_v4l_close() : %i", qc= , sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(%p) in qc_v4l_close() : %i", qc= , 0); down(&qc->lock); /* Can not interrupt, we must success */ qc->users--; PDEBUG("close users=3D%i", qc->users); @@ -2764,10 +2764,10 @@ } } if (qc) { - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_close() : %i", qc,= sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_close() : %i", qc,= 0); up(&qc->lock); } - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(quickcam_list) in qc_v4l_close() = : %i", sem_getcount(&quickcam_list_lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(quickcam_list) in qc_v4l_close() = : %i", 0); up(&quickcam_list_lock); if (qcdebug&QC_DEBUGMUTEX) PDEBUG("MOD_DEC_USE_COUNT in qc_v4l_close() = : %i", GET_USE_COUNT(THIS_MODULE)); MOD_DEC_USE_COUNT; @@ -2801,7 +2801,7 @@ PDEBUG("qc_read: no video_device available or no buffer attached :( EF= AULT"); return -EFAULT; } - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(%p) in qc_v4l_read() : %i"= , qc, sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(%p) in qc_v4l_read() : %i"= , qc, 0); if (down_interruptible(&qc->lock)) return -ERESTARTSYS; if (!qc->connected) { r =3D -ENODEV; @@ -2823,7 +2823,7 @@ } r =3D count; =20 -fail: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_read() : %i", = qc, sem_getcount(&qc->lock)); +fail: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_read() : %i", = qc, 0); up(&qc->lock); if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGERRORS) if (r<0) PDEBUG("f= ailed qc_v4l_read()=3D%i", (int)r); return r; @@ -2852,14 +2852,14 @@ struct vm_area_struct *vma =3D NULL; #endif if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_mmap(= dev=3D%p,size=3D%li,qc=3D%p)",dev,size,qc); - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(%p) in qc_v4l_mmap() : %i"= , qc, sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(%p) in qc_v4l_mmap() : %i"= , qc, 0); if (down_interruptible(&qc->lock)) return -ERESTARTSYS; if (!qc->connected) { ret =3D -ENODEV; goto fail; } frame_size =3D qc_capt_frameaddr(qc, &frame); if (frame_size<0) { ret =3D frame_size; goto fail; } /* Should never h= appen */ ret =3D qc_mm_remap(vma, frame, frame_size, start, size); =20 -fail: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_mmap() : %i", = qc, sem_getcount(&qc->lock)); +fail: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_mmap() : %i", = qc, 0); up(&qc->lock); if (ret<0) if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGERRORS) PDEBUG(= "failed qc_v4l_mmap()=3D%i",ret); return ret; @@ -2881,7 +2881,7 @@ int i, retval =3D 0; =20 if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_ioctl= (dev=3D%p,cmd=3D%u,arg=3D%p,qc=3D%p)",dev,cmd,argp,qc); - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(%p) in qc_v4l_ioctl() : %i= ", qc, sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(%p) in qc_v4l_ioctl() : %i= ", qc, 0); if (down_interruptible(&qc->lock)) return -ERESTARTSYS; if (!qc->connected) { retval =3D -ENODEV; @@ -3452,7 +3452,7 @@ retval =3D -ENOIOCTLCMD; break; } -fail: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_ioctl() : %i",= qc, sem_getcount(&qc->lock)); +fail: if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_v4l_ioctl() : %i",= qc, 0); up(&qc->lock); if (retval<0) if (qcdebug&(QC_DEBUGLOGIC|QC_DEBUGUSER|QC_DEBUGERRORS)) = PDEBUG("failed qc_v4l_ioctl()=3D%i",retval); return retval; @@ -3547,21 +3547,21 @@ =20 /* Check if there is already a suitable quickcam struct that can be reu= sed */ reuse_qc =3D FALSE; - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(quickcam_list_lock) in qc_= usb_init() : %i", sem_getcount(&quickcam_list_lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(quickcam_list_lock) in qc_= usb_init() : %i", 0); if (down_interruptible(&quickcam_list_lock)) return NULL; list_for_each_entry(qc, &quickcam_list, list) { if (qc->dev !=3D NULL) { continue; /* quickcam_list_lock protects this test */ } - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(%p) in qc_usb_init() : %i= ",qc, sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down_intr(%p) in qc_usb_init() : %i= ",qc, 0); if (down_interruptible(&qc->lock)) { /* Failed to lock the camera. Move on in the list, skipping this came= ra */ - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("failed locking the camera %p in qc= _usb_init() : %i",qc,sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("failed locking the camera %p in qc= _usb_init() : %i",qc,0); continue; } if (qc->users<=3D0) { PRINTK(KERN_NOTICE, "Unplugged unused camera detected!"); - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_usb_init() : %i",qc, = sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_usb_init() : %i",qc, = 0); up(&qc->lock); continue; } @@ -3662,7 +3662,7 @@ #endif /* Register input device for button */ qc->input_ptr->name =3D "Quickcam snapshot button"; - qc->input_ptr->private =3D qc; + //qc->input_ptr->private =3D qc; #if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,24) qc->input_ptr->evbit[0] =3D BIT_MASK(EV_KEY); qc->input_ptr->keybit[BIT_WORD(BTN_0)] =3D BIT_MASK(BTN_0); @@ -3769,9 +3769,9 @@ qc_v4l_exit(qc); #endif =20 - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_usb_init() : %i",qc, se= m_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_usb_init() : %i",qc, 0)= ; up(&qc->lock); - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(quickcam_list) in qc_usb_init() := %i", sem_getcount(&quickcam_list_lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(quickcam_list) in qc_usb_init() := %i", 0); up(&quickcam_list_lock); return qc; =20 @@ -3781,14 +3781,14 @@ fail2:=09 qc->dev =3D NULL; qc->connected =3D FALSE; - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_usb_init()=3Dfailed : %= i",qc, sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_usb_init()=3Dfailed : %= i",qc, 0); up(&qc->lock); =20 if (!reuse_qc) { kfree(qc); } fail1: if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGERRORS) PDEBUG("fail= ed qc_usb_init()=3D%i",r); - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(quickcam_list) in qc_usb_init()=3D= failed : %i", sem_getcount(&quickcam_list_lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(quickcam_list) in qc_usb_init()=3D= failed : %i", 0); up(&quickcam_list_lock); return NULL; } @@ -4057,9 +4057,9 @@ */ qc->connected =3D FALSE; =20 - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(quickcam_list) in qc_usb_discon= nect() : %i", sem_getcount(&quickcam_list_lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(quickcam_list) in qc_usb_discon= nect() : %i", 0); down(&quickcam_list_lock); /* Also avoids race condition with open() *= / - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(%p) in qc_usb_disconnect() : %i= ", qc, sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("down(%p) in qc_usb_disconnect() : %i= ", qc, 0); down(&qc->lock); /* Can not interrupt, we must success */ =20 if (qc->users <=3D 0) { @@ -4072,11 +4072,11 @@ qc_isoc_stop(qc); /* Unlink and free isochronous URBs */ qc_int_exit(qc); qc->dev =3D NULL; /* Must be set to NULL only after interrupts are g= uaranteed to be disabled! */ - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_usb_disconnect() : %i"= ,qc, sem_getcount(&qc->lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(%p) in qc_usb_disconnect() : %i"= ,qc, 0); up(&qc->lock); } =20 - if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(quickcam_list) in qc_usb_disconne= ct() : %i", sem_getcount(&quickcam_list_lock)); + if (qcdebug&QC_DEBUGMUTEX) PDEBUG("up(quickcam_list) in qc_usb_disconne= ct() : %i", 0); up(&quickcam_list_lock); if (qcdebug&QC_DEBUGMUTEX) PDEBUG("MOD_DEC_USE_COUNT in qc_usb_disconne= ct() : %i",GET_USE_COUNT(THIS_MODULE)); MOD_DEC_USE_COUNT; /* Release lock--if device is not open, module can b= e now freed */