Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b656321 authored by Jean-François Moine's avatar Jean-François Moine Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB: gspca - all modules: Display error messages when gspca debug disabled

parent 54826437
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -510,7 +510,7 @@ static int cpia_usb_transferCmd(struct gspca_dev *gspca_dev, u8 *command)
			      gspca_dev->usb_buf, databytes, 1000);

	if (ret < 0)
		PDEBUG(D_ERR, "usb_control_msg %02x, error %d", command[1],
		err("usb_control_msg %02x, error %d", command[1],
		       ret);

	if (ret == -EPIPE && retries > 0) {
@@ -1236,7 +1236,7 @@ static void monitor_exposure(struct gspca_dev *gspca_dev)
	cmd[7] = 0;
	ret = cpia_usb_transferCmd(gspca_dev, cmd);
	if (ret) {
		PDEBUG(D_ERR, "ReadVPRegs(30,4,9,8) - failed: %d", ret);
		err("ReadVPRegs(30,4,9,8) - failed: %d", ret);
		return;
	}
	exp_acc = gspca_dev->usb_buf[0];
+3 −3
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
	/* Init the device */
	ret = command(gspca_dev, 0);
	if (ret < 0) {
		PDEBUG(D_STREAM, "init failed %d", ret);
		err("init failed %d", ret);
		return ret;
	}

@@ -194,14 +194,14 @@ static int sd_start(struct gspca_dev *gspca_dev)
			FPIX_MAX_TRANSFER, &len,
			FPIX_TIMEOUT);
	if (ret < 0) {
		PDEBUG(D_STREAM, "usb_bulk_msg failed %d", ret);
		err("usb_bulk_msg failed %d", ret);
		return ret;
	}

	/* Request a frame, but don't read it */
	ret = command(gspca_dev, 1);
	if (ret < 0) {
		PDEBUG(D_STREAM, "frame request failed %d", ret);
		err("frame request failed %d", ret);
		return ret;
	}

+1 −2
Original line number Diff line number Diff line
@@ -585,8 +585,7 @@ int gl860_RTx(struct gspca_dev *gspca_dev,
	}

	if (r < 0)
		PDEBUG(D_ERR,
			"ctrl transfer failed %4d "
		err("ctrl transfer failed %4d "
			"[p%02x r%d v%04x i%04x len%d]",
			r, pref, req, val, index, len);
	else if (len > 1 && r < len)
+9 −11
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ static void int_irq(struct urb *urb)
	if (ret == 0) {
		ret = usb_submit_urb(urb, GFP_ATOMIC);
		if (ret < 0)
			PDEBUG(D_ERR, "Resubmit URB failed with error %i", ret);
			err("Resubmit URB failed with error %i", ret);
	}
}

@@ -177,8 +177,8 @@ static int gspca_input_connect(struct gspca_dev *dev)

		err = input_register_device(input_dev);
		if (err) {
			PDEBUG(D_ERR, "Input device registration failed "
				"with error %i", err);
			err("Input device registration failed with error %i",
				err);
			input_dev->dev.parent = NULL;
			input_free_device(input_dev);
		} else {
@@ -328,8 +328,7 @@ static void fill_frame(struct gspca_dev *gspca_dev,
		}
		st = urb->iso_frame_desc[i].status;
		if (st) {
			PDEBUG(D_ERR,
				"ISOC data error: [%d] len=%d, status=%d",
			err("ISOC data error: [%d] len=%d, status=%d",
				i, len, st);
			gspca_dev->last_packet_type = DISCARD_PACKET;
			continue;
@@ -347,7 +346,7 @@ static void fill_frame(struct gspca_dev *gspca_dev,
	/* resubmit the URB */
	st = usb_submit_urb(urb, GFP_ATOMIC);
	if (st < 0)
		PDEBUG(D_ERR|D_PACK, "usb_submit_urb() ret %d", st);
		err("usb_submit_urb() ret %d", st);
}

/*
@@ -401,7 +400,7 @@ static void bulk_irq(struct urb *urb)
	if (gspca_dev->cam.bulk_nurbs != 0) {
		st = usb_submit_urb(urb, GFP_ATOMIC);
		if (st < 0)
			PDEBUG(D_ERR|D_PACK, "usb_submit_urb() ret %d", st);
			err("usb_submit_urb() ret %d", st);
	}
}

@@ -590,7 +589,7 @@ static int gspca_set_alt0(struct gspca_dev *gspca_dev)
		return 0;
	ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 0);
	if (ret < 0)
		PDEBUG(D_ERR|D_STREAM, "set alt 0 err %d", ret);
		err("set alt 0 err %d", ret);
	return ret;
}

@@ -850,8 +849,7 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev)
			break;
		gspca_stream_off(gspca_dev);
		if (ret != -ENOSPC) {
			PDEBUG(D_ERR|D_STREAM,
				"usb_submit_urb alt %d err %d",
			err("usb_submit_urb alt %d err %d",
				gspca_dev->alt, ret);
			goto out;
		}
@@ -2243,7 +2241,7 @@ int gspca_dev_probe(struct usb_interface *intf,

	/* we don't handle multi-config cameras */
	if (dev->descriptor.bNumConfigurations != 1) {
		PDEBUG(D_ERR, "%04x:%04x too many config",
		err("%04x:%04x too many config",
				id->idVendor, id->idProduct);
		return -ENODEV;
	}
+3 −3
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ static int jlj_write2(struct gspca_dev *gspca_dev, unsigned char *command)
			usb_sndbulkpipe(gspca_dev->dev, 3),
			gspca_dev->usb_buf, 2, NULL, 500);
	if (retval < 0)
		PDEBUG(D_ERR, "command write [%02x] error %d",
		err("command write [%02x] error %d",
				gspca_dev->usb_buf[0], retval);
	return retval;
}
@@ -97,7 +97,7 @@ static int jlj_read1(struct gspca_dev *gspca_dev, unsigned char response)
				gspca_dev->usb_buf, 1, NULL, 500);
	response = gspca_dev->usb_buf[0];
	if (retval < 0)
		PDEBUG(D_ERR, "read command [%02x] error %d",
		err("read command [%02x] error %d",
				gspca_dev->usb_buf[0], retval);
	return retval;
}
@@ -191,7 +191,7 @@ static void jlj_dostream(struct work_struct *work)

	buffer = kmalloc(JEILINJ_MAX_TRANSFER, GFP_KERNEL | GFP_DMA);
	if (!buffer) {
		PDEBUG(D_ERR, "Couldn't allocate USB buffer");
		err("Couldn't allocate USB buffer");
		goto quit_stream;
	}
	while (gspca_dev->present && gspca_dev->streaming) {
Loading