[PATCH] UEAGLE : cosmetic
this patch is purely cosmetic. There is : - indentation cleaning - unneeded cast removing - comments cleaning Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3c9666cc18
commit
e40abaf633
@@ -632,8 +632,7 @@ static int request_dsp(struct uea_softc *sc)
|
|||||||
dsp_name = FW_DIR "DSPep.bin";
|
dsp_name = FW_DIR "DSPep.bin";
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = request_firmware(&sc->dsp_firm,
|
ret = request_firmware(&sc->dsp_firm, dsp_name, &sc->usb_dev->dev);
|
||||||
dsp_name, &sc->usb_dev->dev);
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
uea_err(INS_TO_USBDEV(sc),
|
uea_err(INS_TO_USBDEV(sc),
|
||||||
"requesting firmware %s failed with error %d\n",
|
"requesting firmware %s failed with error %d\n",
|
||||||
@@ -748,7 +747,6 @@ static inline int wait_cmv_ack(struct uea_softc *sc)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return (ret == 0) ? -ETIMEDOUT : 0;
|
return (ret == 0) ? -ETIMEDOUT : 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define UCDC_SEND_ENCAPSULATED_COMMAND 0x00
|
#define UCDC_SEND_ENCAPSULATED_COMMAND 0x00
|
||||||
@@ -1189,8 +1187,7 @@ static int load_XILINX_firmware(struct uea_softc *sc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* finish to send the fpga
|
/* finish to send the fpga */
|
||||||
*/
|
|
||||||
ret = uea_request(sc, 0xe, 1, 0, NULL);
|
ret = uea_request(sc, 0xe, 1, 0, NULL);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
uea_err(INS_TO_USBDEV(sc),
|
uea_err(INS_TO_USBDEV(sc),
|
||||||
@@ -1198,9 +1195,7 @@ static int load_XILINX_firmware(struct uea_softc *sc)
|
|||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Tell the modem we finish : de-assert reset */
|
||||||
* Tell the modem we finish : de-assert reset
|
|
||||||
*/
|
|
||||||
value = 0;
|
value = 0;
|
||||||
ret = uea_send_modem_cmd(sc->usb_dev, 0xe, 1, &value);
|
ret = uea_send_modem_cmd(sc->usb_dev, 0xe, 1, &value);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@@ -1214,6 +1209,7 @@ err0:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The modem send us an ack. First with check if it right */
|
||||||
static void uea_dispatch_cmv(struct uea_softc *sc, struct cmv* cmv)
|
static void uea_dispatch_cmv(struct uea_softc *sc, struct cmv* cmv)
|
||||||
{
|
{
|
||||||
uea_enters(INS_TO_USBDEV(sc));
|
uea_enters(INS_TO_USBDEV(sc));
|
||||||
@@ -1273,23 +1269,19 @@ bad1:
|
|||||||
*/
|
*/
|
||||||
static void uea_intr(struct urb *urb, struct pt_regs *regs)
|
static void uea_intr(struct urb *urb, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct uea_softc *sc = (struct uea_softc *)urb->context;
|
struct uea_softc *sc = urb->context;
|
||||||
struct intr_pkt *intr;
|
struct intr_pkt *intr = urb->transfer_buffer;
|
||||||
uea_enters(INS_TO_USBDEV(sc));
|
uea_enters(INS_TO_USBDEV(sc));
|
||||||
|
|
||||||
if (urb->status < 0) {
|
if (unlikely(urb->status < 0)) {
|
||||||
uea_err(INS_TO_USBDEV(sc), "uea_intr() failed with %d\n",
|
uea_err(INS_TO_USBDEV(sc), "uea_intr() failed with %d\n",
|
||||||
urb->status);
|
urb->status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
intr = (struct intr_pkt *) urb->transfer_buffer;
|
|
||||||
|
|
||||||
/* device-to-host interrupt */
|
/* device-to-host interrupt */
|
||||||
if (intr->bType != 0x08 || sc->booting) {
|
if (intr->bType != 0x08 || sc->booting) {
|
||||||
uea_err(INS_TO_USBDEV(sc), "wrong intr\n");
|
uea_err(INS_TO_USBDEV(sc), "wrong interrupt\n");
|
||||||
// rebooting ?
|
|
||||||
// sc->reset = 1;
|
|
||||||
goto resubmit;
|
goto resubmit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1305,7 +1297,7 @@ static void uea_intr(struct urb *urb, struct pt_regs *regs)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
uea_err(INS_TO_USBDEV(sc), "unknown intr %u\n",
|
uea_err(INS_TO_USBDEV(sc), "unknown interrupt %u\n",
|
||||||
le16_to_cpu(intr->wInterrupt));
|
le16_to_cpu(intr->wInterrupt));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1384,7 +1376,7 @@ static void uea_stop(struct uea_softc *sc)
|
|||||||
int ret;
|
int ret;
|
||||||
uea_enters(INS_TO_USBDEV(sc));
|
uea_enters(INS_TO_USBDEV(sc));
|
||||||
ret = kthread_stop(sc->kthread);
|
ret = kthread_stop(sc->kthread);
|
||||||
uea_info(INS_TO_USBDEV(sc), "kthread finish with status %d\n", ret);
|
uea_dbg(INS_TO_USBDEV(sc), "kthread finish with status %d\n", ret);
|
||||||
|
|
||||||
/* stop any pending boot process */
|
/* stop any pending boot process */
|
||||||
flush_scheduled_work();
|
flush_scheduled_work();
|
||||||
@@ -1641,9 +1633,7 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* ADI930 has only 2 interfaces and inbound traffic
|
/* ADI930 has only 2 interfaces and inbound traffic is on interface 1 */
|
||||||
* is on interface 1
|
|
||||||
*/
|
|
||||||
if (UEA_CHIP_VERSION(id) != ADI930) {
|
if (UEA_CHIP_VERSION(id) != ADI930) {
|
||||||
/* interface 2 is for inbound traffic */
|
/* interface 2 is for inbound traffic */
|
||||||
ret = claim_interface(usb, usbatm, UEA_DS_IFACE_NO);
|
ret = claim_interface(usb, usbatm, UEA_DS_IFACE_NO);
|
||||||
|
Reference in New Issue
Block a user