#ifdef CONFIG_INPUT input_report_key(&cam->input, BTN_0, cam->buttonsts); input_sync(&cam->input); #endif 
konicawc_report_buttonstat(cam); 
static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct urb *stsurb){	char *cdata;	int i, totlen = 0;	unsigned char *status = stsurb->transfer_buffer;	int keep = 0, discard = 0, bad = 0;	struct konicawc *cam = (struct konicawc *)uvd->user_data;	for (i = 0; i < dataurb->number_of_packets; i++) {		int button = cam->buttonsts;		unsigned char sts;		int n = dataurb->iso_frame_desc[i].actual_length;		int st = dataurb->iso_frame_desc[i].status;		cdata = dataurb->transfer_buffer +			dataurb->iso_frame_desc[i].offset;		/* Detect and ignore errored packets */		if (st < 0) {			DEBUG(1, "Data error: packet=%d. len=%d. status=%d.",			      i, n, st);			uvd->stats.iso_err_count++;			continue;		}		/* Detect and ignore empty packets */		if (n <= 0) {			uvd->stats.iso_skip_count++;			continue;		}		/* See what the status data said about the packet */		sts = *(status+stsurb->iso_frame_desc[i].offset);		/* sts: 0x80-0xff: frame start with frame number (ie 0-7f)		 * otherwise:		 * bit 0 0: keep packet		 *	 1: drop packet (padding data)		 *		 * bit 4 0 button not clicked		 *       1 button clicked		 * button is used to `take a picture' (in software)		 */		if(sts < 0x80) {			button = !!(sts & 0x40);			sts &= ~0x40;		}				/* work out the button status, but don't do		   anything with it for now */		if(button != cam->buttonsts) {			DEBUG(2, "button: %sclicked", button ? "" : "un");			cam->buttonsts = button;#ifdef CONFIG_INPUT			input_report_key(&cam->input, BTN_0, cam->buttonsts);			input_sync(&cam->input);#endif		}		if(sts == 0x01) { /* drop frame */			discard++;			continue;		}				if((sts > 0x01) && (sts < 0x80)) {			info("unknown status %2.2x", sts);			bad++;			continue;		}		if(!sts && cam->lastframe == -2) {			DEBUG(2, "dropping frame looking for image start");			continue;		}		keep++;		if(sts & 0x80) { /* frame start */			unsigned char marker[] = { 0, 0xff, 0, 0x00 };			if(cam->lastframe == -2) {				DEBUG(2, "found initial image");				cam->lastframe = -1;			}							marker[3] = sts & 0x7F;			RingQueue_Enqueue(&uvd->dp, marker, 4);			totlen += 4;		}		totlen += n;	/* Little local accounting */		RingQueue_Enqueue(&uvd->dp, cdata, n);	}	DEBUG(8, "finished: keep = %d discard = %d bad = %d added %d bytes",		    keep, discard, bad, totlen);	return totlen;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/0259567ad60df13a55583b84d2cddb5526705907/konicawc.c/buggy/drivers/usb/media/konicawc.c