Commit 6a7b781d authored by Felipe Balbi's avatar Felipe Balbi Committed by Tony Lindgren

USB: MUSB: checkpatch.pl fixed to musb_core.c

Misc cleanup patch.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent fc7b5255
...@@ -97,8 +97,7 @@ ...@@ -97,8 +97,7 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/kobject.h> #include <linux/kobject.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/io.h>
#include <asm/io.h>
#ifdef CONFIG_ARM #ifdef CONFIG_ARM
#include <asm/arch/hardware.h> #include <asm/arch/hardware.h>
...@@ -180,7 +179,7 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src) ...@@ -180,7 +179,7 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
index += len & ~0x03; index += len & ~0x03;
} }
if (len & 0x02) { if (len & 0x02) {
musb_writew(fifo, 0, *(u16*)&src[index]); musb_writew(fifo, 0, *(u16 *)&src[index]);
index += 2; index += 2;
} }
} else { } else {
...@@ -218,7 +217,7 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst) ...@@ -218,7 +217,7 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
index = len & ~0x03; index = len & ~0x03;
} }
if (len & 0x02) { if (len & 0x02) {
*(u16*)&dst[index] = musb_readw(fifo, 0); *(u16 *)&dst[index] = musb_readw(fifo, 0);
index += 2; index += 2;
} }
} else { } else {
...@@ -388,9 +387,9 @@ void musb_hnp_stop(struct musb *musb) ...@@ -388,9 +387,9 @@ void musb_hnp_stop(struct musb *musb)
#define STAGE0_MASK (MUSB_INTR_RESUME | MUSB_INTR_SESSREQ \ #define STAGE0_MASK (MUSB_INTR_RESUME | MUSB_INTR_SESSREQ \
| MUSB_INTR_VBUSERROR | MUSB_INTR_CONNECT \ | MUSB_INTR_VBUSERROR | MUSB_INTR_CONNECT \
| MUSB_INTR_RESET ) | MUSB_INTR_RESET)
static irqreturn_t musb_stage0_irq(struct musb * musb, u8 int_usb, static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
u8 devctl, u8 power) u8 devctl, u8 power)
{ {
irqreturn_t handled = IRQ_NONE; irqreturn_t handled = IRQ_NONE;
...@@ -710,7 +709,7 @@ static irqreturn_t musb_stage0_irq(struct musb * musb, u8 int_usb, ...@@ -710,7 +709,7 @@ static irqreturn_t musb_stage0_irq(struct musb * musb, u8 int_usb,
* @param devctl * @param devctl
* @param power * @param power
*/ */
static irqreturn_t musb_stage2_irq(struct musb * musb, u8 int_usb, static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
u8 devctl, u8 power) u8 devctl, u8 power)
{ {
irqreturn_t handled = IRQ_NONE; irqreturn_t handled = IRQ_NONE;
...@@ -1221,13 +1220,13 @@ static int __init ep_config_from_table(struct musb *musb) ...@@ -1221,13 +1220,13 @@ static int __init ep_config_from_table(struct musb *musb)
u8 epn = cfg->hw_ep_num; u8 epn = cfg->hw_ep_num;
if (epn >= MUSB_C_NUM_EPS) { if (epn >= MUSB_C_NUM_EPS) {
pr_debug( "%s: invalid ep %d\n", pr_debug("%s: invalid ep %d\n",
musb_driver_name, epn); musb_driver_name, epn);
continue; continue;
} }
offset = fifo_setup(musb, hw_ep + epn, cfg++, offset); offset = fifo_setup(musb, hw_ep + epn, cfg++, offset);
if (offset < 0) { if (offset < 0) {
pr_debug( "%s: mem overrun, ep %d\n", pr_debug("%s: mem overrun, ep %d\n",
musb_driver_name, epn); musb_driver_name, epn);
return -EINVAL; return -EINVAL;
} }
...@@ -1242,7 +1241,7 @@ static int __init ep_config_from_table(struct musb *musb) ...@@ -1242,7 +1241,7 @@ static int __init ep_config_from_table(struct musb *musb)
#ifdef CONFIG_USB_MUSB_HDRC_HCD #ifdef CONFIG_USB_MUSB_HDRC_HCD
if (!musb->bulk_ep) { if (!musb->bulk_ep) {
pr_debug( "%s: missing bulk\n", musb_driver_name); pr_debug("%s: missing bulk\n", musb_driver_name);
return -EINVAL; return -EINVAL;
} }
#endif #endif
...@@ -1309,7 +1308,7 @@ static int __init ep_config_from_hw(struct musb *musb) ...@@ -1309,7 +1308,7 @@ static int __init ep_config_from_hw(struct musb *musb)
#ifdef CONFIG_USB_MUSB_HDRC_HCD #ifdef CONFIG_USB_MUSB_HDRC_HCD
if (!musb->bulk_ep) { if (!musb->bulk_ep) {
pr_debug( "%s: missing bulk\n", musb_driver_name); pr_debug("%s: missing bulk\n", musb_driver_name);
return -EINVAL; return -EINVAL;
} }
#endif #endif
...@@ -1340,9 +1339,8 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb) ...@@ -1340,9 +1339,8 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
reg = musb_readb(mbase, 0x10 + MUSB_CONFIGDATA); reg = musb_readb(mbase, 0x10 + MUSB_CONFIGDATA);
strcpy(aInfo, (reg & MUSB_CONFIGDATA_UTMIDW) ? "UTMI-16" : "UTMI-8"); strcpy(aInfo, (reg & MUSB_CONFIGDATA_UTMIDW) ? "UTMI-16" : "UTMI-8");
if (reg & MUSB_CONFIGDATA_DYNFIFO) { if (reg & MUSB_CONFIGDATA_DYNFIFO)
strcat(aInfo, ", dyn FIFOs"); strcat(aInfo, ", dyn FIFOs");
}
if (reg & MUSB_CONFIGDATA_MPRXE) { if (reg & MUSB_CONFIGDATA_MPRXE) {
strcat(aInfo, ", bulk combine"); strcat(aInfo, ", bulk combine");
#ifdef C_MP_RX #ifdef C_MP_RX
...@@ -1367,9 +1365,8 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb) ...@@ -1367,9 +1365,8 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
strcat(aInfo, ", HB-ISO Tx"); strcat(aInfo, ", HB-ISO Tx");
strcat(aInfo, " (X)"); /* no driver support */ strcat(aInfo, " (X)"); /* no driver support */
} }
if (reg & MUSB_CONFIGDATA_SOFTCONE) { if (reg & MUSB_CONFIGDATA_SOFTCONE)
strcat(aInfo, ", SoftConn"); strcat(aInfo, ", SoftConn");
}
printk(KERN_DEBUG "%s: ConfigData=0x%02x (%s)\n", printk(KERN_DEBUG "%s: ConfigData=0x%02x (%s)\n",
musb_driver_name, reg, aInfo); musb_driver_name, reg, aInfo);
...@@ -1748,12 +1745,12 @@ static ssize_t ...@@ -1748,12 +1745,12 @@ static ssize_t
musb_srp_store(struct device *dev, struct device_attribute *attr, musb_srp_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t n) const char *buf, size_t n)
{ {
struct musb *musb=dev_to_musb(dev); struct musb *musb = dev_to_musb(dev);
unsigned short srp; unsigned short srp;
if (sscanf(buf, "%hu", &srp) != 1 if (sscanf(buf, "%hu", &srp) != 1
|| (srp != 1)) { || (srp != 1)) {
printk (KERN_ERR "SRP: Value must be 1\n"); printk(KERN_ERR "SRP: Value must be 1\n");
return -EINVAL; return -EINVAL;
} }
...@@ -1921,7 +1918,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) ...@@ -1921,7 +1918,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
#ifdef CONFIG_USB_MUSB_OTG #ifdef CONFIG_USB_MUSB_OTG
break; break;
#else #else
bad_config: bad_config:
#endif #endif
default: default:
dev_err(dev, "incompatible Kconfig role setting\n"); dev_err(dev, "incompatible Kconfig role setting\n");
...@@ -1997,7 +1994,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) ...@@ -1997,7 +1994,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
INIT_WORK(&musb->irq_work, musb_irq_work); INIT_WORK(&musb->irq_work, musb_irq_work);
/* attach to the IRQ */ /* attach to the IRQ */
if (request_irq (nIrq, musb->isr, 0, dev->bus_id, musb)) { if (request_irq(nIrq, musb->isr, 0, dev->bus_id, musb)) {
dev_err(dev, "request_irq %d failed!\n", nIrq); dev_err(dev, "request_irq %d failed!\n", nIrq);
status = -ENODEV; status = -ENODEV;
goto fail2; goto fail2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment