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

Commit 99805f47 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
parents a1342206 9719b0c2
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -611,11 +611,10 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,

		if (add_hotplug_env_var(envp, num_envp, &i,
					buffer, buffer_size, &length,
					"MODALIAS=usb:v%04Xp%04Xdl%04Xdh%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X",
					"MODALIAS=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X",
					le16_to_cpu(usb_dev->descriptor.idVendor),
					le16_to_cpu(usb_dev->descriptor.idProduct),
					le16_to_cpu(usb_dev->descriptor.bcdDevice),
					le16_to_cpu(usb_dev->descriptor.bcdDevice),
					usb_dev->descriptor.bDeviceClass,
					usb_dev->descriptor.bDeviceSubClass,
					usb_dev->descriptor.bDeviceProtocol,
@@ -626,11 +625,10 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
 	} else {
		if (add_hotplug_env_var(envp, num_envp, &i,
					buffer, buffer_size, &length,
					"MODALIAS=usb:v%04Xp%04Xdl%04Xdh%04Xdc%02Xdsc%02Xdp%02Xic*isc*ip*",
					"MODALIAS=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic*isc*ip*",
					le16_to_cpu(usb_dev->descriptor.idVendor),
					le16_to_cpu(usb_dev->descriptor.idProduct),
					le16_to_cpu(usb_dev->descriptor.bcdDevice),
					le16_to_cpu(usb_dev->descriptor.bcdDevice),
					usb_dev->descriptor.bDeviceClass,
					usb_dev->descriptor.bDeviceSubClass,
					usb_dev->descriptor.bDeviceProtocol))
+1 −1
Original line number Diff line number Diff line
@@ -335,7 +335,7 @@ static int mts_scsi_abort (Scsi_Cmnd *srb)

	mts_urb_abort(desc);

	return FAILURE;
	return FAILED;
}

static int mts_scsi_host_reset (Scsi_Cmnd *srb)
+1 −1
Original line number Diff line number Diff line
@@ -619,7 +619,7 @@ static void ati_remote_delete(struct ati_remote *ati_remote)
		
	if (ati_remote->outbuf)
		usb_buffer_free(ati_remote->udev, DATA_BUFSIZE, 
				ati_remote->inbuf, ati_remote->outbuf_dma);
				ati_remote->outbuf, ati_remote->outbuf_dma);
	
	if (ati_remote->irq_urb)
		usb_free_urb(ati_remote->irq_urb);
+2 −1
Original line number Diff line number Diff line
@@ -133,7 +133,8 @@ resubmit:
				kbd->usbdev->devpath, i);
}

int usb_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
static int usb_kbd_event(struct input_dev *dev, unsigned int type,
			 unsigned int code, int value)
{
	struct usb_kbd *kbd = dev->private;

+39 −39
Original line number Diff line number Diff line
@@ -418,6 +418,44 @@ static inline int set_video_mode_Kiara(struct pwc_device *pdev, int size, int fr



static void pwc_set_image_buffer_size(struct pwc_device *pdev)
{
	int i, factor = 0, filler = 0;

	/* for PALETTE_YUV420P */
	switch(pdev->vpalette)
	{
	case VIDEO_PALETTE_YUV420P:
		factor = 6;
		filler = 128;
		break;
	case VIDEO_PALETTE_RAW:
		factor = 6; /* can be uncompressed YUV420P */
		filler = 0;
		break;
	}

	/* Set sizes in bytes */
	pdev->image.size = pdev->image.x * pdev->image.y * factor / 4;
	pdev->view.size  = pdev->view.x  * pdev->view.y  * factor / 4;

	/* Align offset, or you'll get some very weird results in
	   YUV420 mode... x must be multiple of 4 (to get the Y's in
	   place), and y even (or you'll mixup U & V). This is less of a
	   problem for YUV420P.
	 */
	pdev->offset.x = ((pdev->view.x - pdev->image.x) / 2) & 0xFFFC;
	pdev->offset.y = ((pdev->view.y - pdev->image.y) / 2) & 0xFFFE;

	/* Fill buffers with gray or black */
	for (i = 0; i < MAX_IMAGES; i++) {
		if (pdev->image_ptr[i] != NULL)
			memset(pdev->image_ptr[i], filler, pdev->view.size);
	}
}



/**
   @pdev: device structure
   @width: viewport width
@@ -475,44 +513,6 @@ int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frame
}


void pwc_set_image_buffer_size(struct pwc_device *pdev)
{
	int i, factor = 0, filler = 0;

	/* for PALETTE_YUV420P */
	switch(pdev->vpalette)
	{
	case VIDEO_PALETTE_YUV420P:
		factor = 6;
		filler = 128;
		break;
	case VIDEO_PALETTE_RAW:
		factor = 6; /* can be uncompressed YUV420P */
		filler = 0;
		break;
	}

	/* Set sizes in bytes */
	pdev->image.size = pdev->image.x * pdev->image.y * factor / 4;
	pdev->view.size  = pdev->view.x  * pdev->view.y  * factor / 4;

	/* Align offset, or you'll get some very weird results in
	   YUV420 mode... x must be multiple of 4 (to get the Y's in
	   place), and y even (or you'll mixup U & V). This is less of a
	   problem for YUV420P.
	 */
	pdev->offset.x = ((pdev->view.x - pdev->image.x) / 2) & 0xFFFC;
	pdev->offset.y = ((pdev->view.y - pdev->image.y) / 2) & 0xFFFE;

	/* Fill buffers with gray or black */
	for (i = 0; i < MAX_IMAGES; i++) {
		if (pdev->image_ptr[i] != NULL)
			memset(pdev->image_ptr[i], filler, pdev->view.size);
	}
}



/* BRIGHTNESS */

int pwc_get_brightness(struct pwc_device *pdev)
@@ -949,7 +949,7 @@ int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value)
	return SendControlMsg(SET_STATUS_CTL, LED_FORMATTER, 2);
}

int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value)
static int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value)
{
	unsigned char buf[2];
	int ret;
Loading