Skip to content

Commit

Permalink
Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…gregkh/usb-2.6.git/
  • Loading branch information
Linus Torvalds committed Apr 26, 2005
2 parents a134220 + 9719b0c commit 99805f4
Show file tree
Hide file tree
Showing 17 changed files with 534 additions and 247 deletions.
6 changes: 2 additions & 4 deletions drivers/usb/core/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/image/microtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/input/ati_remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/input/usbkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ static void usb_kbd_irq(struct urb *urb, struct pt_regs *regs)
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;

Expand Down
78 changes: 39 additions & 39 deletions drivers/usb/media/pwc/pwc-ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/media/pwc/pwc-if.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static int default_mbufs = 2; /* Default number of mmap() buffers */
int pwc_trace = TRACE_MODULE | TRACE_FLOW | TRACE_PWCX;
static int power_save = 0;
static int led_on = 100, led_off = 0; /* defaults to LED that is on while in use */
int pwc_preferred_compression = 2; /* 0..3 = uncompressed..high */
static int pwc_preferred_compression = 2; /* 0..3 = uncompressed..high */
static struct {
int type;
char serial_number[30];
Expand Down
6 changes: 1 addition & 5 deletions drivers/usb/media/pwc/pwc.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,8 @@ struct pwc_device
extern "C" {
#endif

/* Global variables */
/* Global variable */
extern int pwc_trace;
extern int pwc_preferred_compression;

/** functions in pwc-if.c */
int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_fps, int new_compression, int new_snapshot);
Expand All @@ -243,8 +242,6 @@ void pwc_construct(struct pwc_device *pdev);
/** Functions in pwc-ctrl.c */
/* Request a certain video mode. Returns < 0 if not possible */
extern int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot);
/* Calculate the number of bytes per image (not frame) */
extern void pwc_set_image_buffer_size(struct pwc_device *pdev);

/* Various controls; should be obvious. Value 0..65535, or < 0 on error */
extern int pwc_get_brightness(struct pwc_device *pdev);
Expand All @@ -256,7 +253,6 @@ extern int pwc_set_gamma(struct pwc_device *pdev, int value);
extern int pwc_get_saturation(struct pwc_device *pdev);
extern int pwc_set_saturation(struct pwc_device *pdev, int value);
extern int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value);
extern int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value);
extern int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor);

/* Power down or up the camera; not supported by all models */
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/media/sn9c102_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ sn9c102_i2c_try_read(struct sn9c102_device* cam,
}


int
static int
sn9c102_i2c_try_write(struct sn9c102_device* cam,
struct sn9c102_sensor* sensor, u8 address, u8 value)
{
Expand Down Expand Up @@ -785,7 +785,7 @@ static int sn9c102_stop_transfer(struct sn9c102_device* cam)
}


int sn9c102_stream_interrupt(struct sn9c102_device* cam)
static int sn9c102_stream_interrupt(struct sn9c102_device* cam)
{
int err = 0;

Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/media/sn9c102_sensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ static const struct usb_device_id sn9c102_id_table[] = { \
*/

/* The "try" I2C I/O versions are used when probing the sensor */
extern int sn9c102_i2c_try_write(struct sn9c102_device*,struct sn9c102_sensor*,
u8 address, u8 value);
extern int sn9c102_i2c_try_read(struct sn9c102_device*,struct sn9c102_sensor*,
u8 address);

Expand Down
1 change: 1 addition & 0 deletions drivers/usb/misc/sisusbvga/sisusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3105,6 +3105,7 @@ static void sisusb_disconnect(struct usb_interface *intf)
static struct usb_device_id sisusb_table [] = {
{ USB_DEVICE(0x0711, 0x0900) },
{ USB_DEVICE(0x182d, 0x021c) },
{ USB_DEVICE(0x182d, 0x0269) },
{ }
};

Expand Down
Loading

0 comments on commit 99805f4

Please sign in to comment.