diff options
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/da8xx.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.c | 17 | ||||
-rw-r--r-- | drivers/usb/musb/musb_host.c | 5 |
3 files changed, 9 insertions, 15 deletions
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index 6c036de63272..b8295ce7c4fe 100644 --- a/drivers/usb/musb/da8xx.c +++ b/drivers/usb/musb/da8xx.c @@ -520,7 +520,7 @@ static int da8xx_probe(struct platform_device *pdev) if (!glue) return -ENOMEM; - clk = devm_clk_get(&pdev->dev, "usb20"); + clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) { dev_err(&pdev->dev, "failed to get clock\n"); return PTR_ERR(clk); diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index ea5013aa69e2..968bf1e8b0fe 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1687,7 +1687,7 @@ EXPORT_SYMBOL_GPL(musb_mailbox); /*-------------------------------------------------------------------------*/ static ssize_t -musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf) +mode_show(struct device *dev, struct device_attribute *attr, char *buf) { struct musb *musb = dev_to_musb(dev); unsigned long flags; @@ -1701,7 +1701,7 @@ musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf) } static ssize_t -musb_mode_store(struct device *dev, struct device_attribute *attr, +mode_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) { struct musb *musb = dev_to_musb(dev); @@ -1721,10 +1721,10 @@ musb_mode_store(struct device *dev, struct device_attribute *attr, return (status == 0) ? n : status; } -static DEVICE_ATTR(mode, 0644, musb_mode_show, musb_mode_store); +static DEVICE_ATTR_RW(mode); static ssize_t -musb_vbus_store(struct device *dev, struct device_attribute *attr, +vbus_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) { struct musb *musb = dev_to_musb(dev); @@ -1748,7 +1748,7 @@ musb_vbus_store(struct device *dev, struct device_attribute *attr, } static ssize_t -musb_vbus_show(struct device *dev, struct device_attribute *attr, char *buf) +vbus_show(struct device *dev, struct device_attribute *attr, char *buf) { struct musb *musb = dev_to_musb(dev); unsigned long flags; @@ -1773,13 +1773,12 @@ musb_vbus_show(struct device *dev, struct device_attribute *attr, char *buf) return sprintf(buf, "Vbus %s, timeout %lu msec\n", vbus ? "on" : "off", val); } -static DEVICE_ATTR(vbus, 0644, musb_vbus_show, musb_vbus_store); +static DEVICE_ATTR_RW(vbus); /* Gadget drivers can't know that a host is connected so they might want * to start SRP, but users can. This allows userspace to trigger SRP. */ -static ssize_t -musb_srp_store(struct device *dev, struct device_attribute *attr, +static ssize_t srp_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) { struct musb *musb = dev_to_musb(dev); @@ -1796,7 +1795,7 @@ musb_srp_store(struct device *dev, struct device_attribute *attr, return n; } -static DEVICE_ATTR(srp, 0644, NULL, musb_srp_store); +static DEVICE_ATTR_WO(srp); static struct attribute *musb_attributes[] = { &dev_attr_mode.attr, diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 2627363fb4fe..394b4ac86161 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -195,7 +195,6 @@ static struct musb_qh *musb_ep_get_qh(struct musb_hw_ep *ep, int is_in) static void musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh) { - u16 frame; u32 len; void __iomem *mbase = musb->mregs; struct urb *urb = next_urb(qh); @@ -244,7 +243,6 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh) case USB_ENDPOINT_XFER_ISOC: case USB_ENDPOINT_XFER_INT: musb_dbg(musb, "check whether there's still time for periodic Tx"); - frame = musb_readw(mbase, MUSB_FRAME); /* FIXME this doesn't implement that scheduling policy ... * or handle framecounter wrapping */ @@ -1781,7 +1779,6 @@ void musb_host_rx(struct musb *musb, u8 epnum) struct musb_qh *qh = hw_ep->in_qh; size_t xfer_len; void __iomem *mbase = musb->mregs; - int pipe; u16 rx_csr, val; bool iso_err = false; bool done = false; @@ -1810,8 +1807,6 @@ void musb_host_rx(struct musb *musb, u8 epnum) return; } - pipe = urb->pipe; - trace_musb_urb_rx(musb, urb); /* check for errors, concurrent stall & unlink is not really |