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

Commit 4ad34da0 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] gspca: the field 'frozen' is under CONFIG_PM



The gspca_dev field 'frozen' is added only if CONFIG_PM is set. So add the
relevant #ifdef's to various subdrivers that use it.

The m32r daily build caught this mistake.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent fed07f84
Loading
Loading
Loading
Loading
+15 −5
Original line number Original line Diff line number Diff line
@@ -94,7 +94,11 @@ static void dostream(struct work_struct *work)


	/* loop reading a frame */
	/* loop reading a frame */
again:
again:
	while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
	while (gspca_dev->dev && gspca_dev->streaming) {
#ifdef CONFIG_PM
		if (gspca_dev->frozen)
			break;
#endif


		/* request a frame */
		/* request a frame */
		mutex_lock(&gspca_dev->usb_lock);
		mutex_lock(&gspca_dev->usb_lock);
@@ -102,8 +106,11 @@ static void dostream(struct work_struct *work)
		mutex_unlock(&gspca_dev->usb_lock);
		mutex_unlock(&gspca_dev->usb_lock);
		if (ret < 0)
		if (ret < 0)
			break;
			break;
		if (gspca_dev->frozen || !gspca_dev->dev ||
#ifdef CONFIG_PM
					 !gspca_dev->streaming)
		if (gspca_dev->frozen)
			break;
#endif
		if (!gspca_dev->dev || !gspca_dev->streaming)
			break;
			break;


		/* the frame comes in parts */
		/* the frame comes in parts */
@@ -118,8 +125,11 @@ static void dostream(struct work_struct *work)
				 * error. Just restart. */
				 * error. Just restart. */
				goto again;
				goto again;
			}
			}
			if (gspca_dev->frozen || !gspca_dev->dev ||
#ifdef CONFIG_PM
						 !gspca_dev->streaming)
			if (gspca_dev->frozen)
				goto out;
#endif
			if (!gspca_dev->dev || !gspca_dev->streaming)
				goto out;
				goto out;
			if (len < FPIX_MAX_TRANSFER ||
			if (len < FPIX_MAX_TRANSFER ||
				(data[len - 2] == 0xff &&
				(data[len - 2] == 0xff &&
+5 −1
Original line number Original line Diff line number Diff line
@@ -335,7 +335,11 @@ static void jl2005c_dostream(struct work_struct *work)
		goto quit_stream;
		goto quit_stream;
	}
	}


	while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
	while (gspca_dev->dev && gspca_dev->streaming) {
#ifdef CONFIG_PM
		if (gspca_dev->frozen)
			break;
#endif
		/* Check if this is a new frame. If so, start the frame first */
		/* Check if this is a new frame. If so, start the frame first */
		if (!header_read) {
		if (!header_read) {
			mutex_lock(&gspca_dev->usb_lock);
			mutex_lock(&gspca_dev->usb_lock);
+5 −1
Original line number Original line Diff line number Diff line
@@ -232,7 +232,11 @@ static void sq905_dostream(struct work_struct *work)
	frame_sz = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].sizeimage
	frame_sz = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].sizeimage
			+ FRAME_HEADER_LEN;
			+ FRAME_HEADER_LEN;


	while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
	while (gspca_dev->dev && gspca_dev->streaming) {
#ifdef CONFIG_PM
		if (gspca_dev->frozen)
			break;
#endif
		/* request some data and then read it until we have
		/* request some data and then read it until we have
		 * a complete frame. */
		 * a complete frame. */
		bytes_left = frame_sz;
		bytes_left = frame_sz;
+5 −1
Original line number Original line Diff line number Diff line
@@ -150,7 +150,11 @@ static void sq905c_dostream(struct work_struct *work)
		goto quit_stream;
		goto quit_stream;
	}
	}


	while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
	while (gspca_dev->dev && gspca_dev->streaming) {
#ifdef CONFIG_PM
		if (gspca_dev->frozen)
			break;
#endif
		/* Request the header, which tells the size to download */
		/* Request the header, which tells the size to download */
		ret = usb_bulk_msg(gspca_dev->dev,
		ret = usb_bulk_msg(gspca_dev->dev,
				usb_rcvbulkpipe(gspca_dev->dev, 0x81),
				usb_rcvbulkpipe(gspca_dev->dev, 0x81),
+5 −1
Original line number Original line Diff line number Diff line
@@ -225,7 +225,11 @@ static void vicam_dostream(struct work_struct *work)
		goto exit;
		goto exit;
	}
	}


	while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
	while (gspca_dev->dev && gspca_dev->streaming) {
#ifdef CONFIG_PM
		if (gspca_dev->frozen)
			break;
#endif
		ret = vicam_read_frame(gspca_dev, buffer, frame_sz);
		ret = vicam_read_frame(gspca_dev, buffer, frame_sz);
		if (ret < 0)
		if (ret < 0)
			break;
			break;
Loading