Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248876
b: refs/heads/master
c: 2efeaeb
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed May 13, 2011
1 parent 775bef6 commit 6032e22
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43b416e5f6a3ce269571cfe25c8f1e8e9316c5b0
refs/heads/master: 2efeaeb00f26c13ac14b8d53684a8bbd3c343ce6
2 changes: 1 addition & 1 deletion trunk/drivers/usb/gadget/at91_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,7 @@ static int __init at91udc_probe(struct platform_device *pdev)
}

/* newer chips have more FIFO memory than rm9200 */
if (cpu_is_at91sam9260()) {
if (cpu_is_at91sam9260() || cpu_is_at91sam9g20()) {
udc->ep[0].maxpacket = 64;
udc->ep[3].maxpacket = 64;
udc->ep[4].maxpacket = 512;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/usb/gadget/f_rndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,7 @@ rndis_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
*/
case ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8)
| USB_CDC_SEND_ENCAPSULATED_COMMAND:
if (w_length > req->length || w_value
|| w_index != rndis->ctrl_id)
if (w_value || w_index != rndis->ctrl_id)
goto invalid;
/* read the request; process it later */
value = w_length;
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/usb/gadget/s3c-hsotg.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,11 +616,10 @@ static unsigned get_ep_limit(struct s3c_hsotg_ep *hs_ep)
maxpkt = S3C_DxEPTSIZ_PktCnt_LIMIT + 1;
} else {
maxsize = 64+64;
if (hs_ep->dir_in) {
if (hs_ep->dir_in)
maxpkt = S3C_DIEPTSIZ0_PktCnt_LIMIT + 1;
} else {
else
maxpkt = 2;
}
}

/* we made the constant loading easier above by using +1 */
Expand Down Expand Up @@ -2568,7 +2567,7 @@ static int s3c_hsotg_corereset(struct s3c_hsotg *hsotg)
if (!(grstctl & S3C_GRSTCTL_AHBIdle))
continue;

break; /* reset done */
break; /* reset done */
}

dev_dbg(hsotg->dev, "reset successful\n");
Expand Down Expand Up @@ -3319,7 +3318,7 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
hsotg->clk = clk_get(&pdev->dev, "otg");
if (IS_ERR(hsotg->clk)) {
dev_err(dev, "cannot get otg clock\n");
ret = -EINVAL;
ret = PTR_ERR(hsotg->clk);
goto err_mem;
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/usb/gadget/s3c-hsudc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ static irqreturn_t s3c_hsudc_irq(int irq, void *_dev)
}

int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
int (*bind)(struct usb_gadget *))
int (*bind)(struct usb_gadget *))
{
struct s3c_hsudc *hsudc = the_controller;
int ret;
Expand Down Expand Up @@ -1299,9 +1299,9 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
s3c_hsudc_setup_ep(hsudc);

hsudc->uclk = clk_get(&pdev->dev, "usb-device");
if (hsudc->uclk == NULL) {
if (IS_ERR(hsudc->uclk)) {
dev_err(dev, "failed to find usb-device clock source\n");
return -ENOENT;
return PTR_ERR(hsudc->uclk);
}
clk_enable(hsudc->uclk);

Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/usb/serial/opticon.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,11 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
/* The conncected devices do not have a bulk write endpoint,
* to transmit data to de barcode device the control endpoint is used */
dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO);
if (!dr)
return -ENOMEM;
if (!dr) {
dev_err(&port->dev, "out of memory\n");
count = -ENOMEM;
goto error;
}

dr->bRequestType = USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT;
dr->bRequest = 0x01;
Expand Down

0 comments on commit 6032e22

Please sign in to comment.