aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthieu castet <castet.matthieu@free.fr>2006-01-18 01:38:37 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-31 20:23:41 -0500
commite40abaf6336ef3756277bab70db47a47da4aa325 (patch)
tree006a28a0a567ca884497073ad71d4ae6b3cd1347
parent3c9666cc18be1fc11698fc0181e124b44889cf37 (diff)
[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>
-rw-r--r--drivers/usb/atm/ueagle-atm.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index ea7dfe0c8275..b0026ecc6a36 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -632,8 +632,7 @@ static int request_dsp(struct uea_softc *sc)
632 dsp_name = FW_DIR "DSPep.bin"; 632 dsp_name = FW_DIR "DSPep.bin";
633 } 633 }
634 634
635 ret = request_firmware(&sc->dsp_firm, 635 ret = request_firmware(&sc->dsp_firm, dsp_name, &sc->usb_dev->dev);
636 dsp_name, &sc->usb_dev->dev);
637 if (ret < 0) { 636 if (ret < 0) {
638 uea_err(INS_TO_USBDEV(sc), 637 uea_err(INS_TO_USBDEV(sc),
639 "requesting firmware %s failed with error %d\n", 638 "requesting firmware %s failed with error %d\n",
@@ -748,7 +747,6 @@ static inline int wait_cmv_ack(struct uea_softc *sc)
748 return ret; 747 return ret;
749 748
750 return (ret == 0) ? -ETIMEDOUT : 0; 749 return (ret == 0) ? -ETIMEDOUT : 0;
751
752} 750}
753 751
754#define UCDC_SEND_ENCAPSULATED_COMMAND 0x00 752#define UCDC_SEND_ENCAPSULATED_COMMAND 0x00
@@ -1189,8 +1187,7 @@ static int load_XILINX_firmware(struct uea_softc *sc)
1189 } 1187 }
1190 } 1188 }
1191 1189
1192 /* finish to send the fpga 1190 /* finish to send the fpga */
1193 */
1194 ret = uea_request(sc, 0xe, 1, 0, NULL); 1191 ret = uea_request(sc, 0xe, 1, 0, NULL);
1195 if (ret < 0) { 1192 if (ret < 0) {
1196 uea_err(INS_TO_USBDEV(sc), 1193 uea_err(INS_TO_USBDEV(sc),
@@ -1198,9 +1195,7 @@ static int load_XILINX_firmware(struct uea_softc *sc)
1198 goto err1; 1195 goto err1;
1199 } 1196 }
1200 1197
1201 /* 1198 /* Tell the modem we finish : de-assert reset */
1202 * Tell the modem we finish : de-assert reset
1203 */
1204 value = 0; 1199 value = 0;
1205 ret = uea_send_modem_cmd(sc->usb_dev, 0xe, 1, &value); 1200 ret = uea_send_modem_cmd(sc->usb_dev, 0xe, 1, &value);
1206 if (ret < 0) 1201 if (ret < 0)
@@ -1214,6 +1209,7 @@ err0:
1214 return ret; 1209 return ret;
1215} 1210}
1216 1211
1212/* The modem send us an ack. First with check if it right */
1217static void uea_dispatch_cmv(struct uea_softc *sc, struct cmv* cmv) 1213static void uea_dispatch_cmv(struct uea_softc *sc, struct cmv* cmv)
1218{ 1214{
1219 uea_enters(INS_TO_USBDEV(sc)); 1215 uea_enters(INS_TO_USBDEV(sc));
@@ -1273,23 +1269,19 @@ bad1:
1273 */ 1269 */
1274static void uea_intr(struct urb *urb, struct pt_regs *regs) 1270static void uea_intr(struct urb *urb, struct pt_regs *regs)
1275{ 1271{
1276 struct uea_softc *sc = (struct uea_softc *)urb->context; 1272 struct uea_softc *sc = urb->context;
1277 struct intr_pkt *intr; 1273 struct intr_pkt *intr = urb->transfer_buffer;
1278 uea_enters(INS_TO_USBDEV(sc)); 1274 uea_enters(INS_TO_USBDEV(sc));
1279 1275
1280 if (urb->status < 0) { 1276 if (unlikely(urb->status < 0)) {
1281 uea_err(INS_TO_USBDEV(sc), "uea_intr() failed with %d\n", 1277 uea_err(INS_TO_USBDEV(sc), "uea_intr() failed with %d\n",
1282 urb->status); 1278 urb->status);
1283 return; 1279 return;
1284 } 1280 }
1285 1281
1286 intr = (struct intr_pkt *) urb->transfer_buffer;
1287
1288 /* device-to-host interrupt */ 1282 /* device-to-host interrupt */
1289 if (intr->bType != 0x08 || sc->booting) { 1283 if (intr->bType != 0x08 || sc->booting) {
1290 uea_err(INS_TO_USBDEV(sc), "wrong intr\n"); 1284 uea_err(INS_TO_USBDEV(sc), "wrong interrupt\n");
1291 // rebooting ?
1292 // sc->reset = 1;
1293 goto resubmit; 1285 goto resubmit;
1294 } 1286 }
1295 1287
@@ -1305,7 +1297,7 @@ static void uea_intr(struct urb *urb, struct pt_regs *regs)
1305 break; 1297 break;
1306 1298
1307 default: 1299 default:
1308 uea_err(INS_TO_USBDEV(sc), "unknown intr %u\n", 1300 uea_err(INS_TO_USBDEV(sc), "unknown interrupt %u\n",
1309 le16_to_cpu(intr->wInterrupt)); 1301 le16_to_cpu(intr->wInterrupt));
1310 } 1302 }
1311 1303
@@ -1384,7 +1376,7 @@ static void uea_stop(struct uea_softc *sc)
1384 int ret; 1376 int ret;
1385 uea_enters(INS_TO_USBDEV(sc)); 1377 uea_enters(INS_TO_USBDEV(sc));
1386 ret = kthread_stop(sc->kthread); 1378 ret = kthread_stop(sc->kthread);
1387 uea_info(INS_TO_USBDEV(sc), "kthread finish with status %d\n", ret); 1379 uea_dbg(INS_TO_USBDEV(sc), "kthread finish with status %d\n", ret);
1388 1380
1389 /* stop any pending boot process */ 1381 /* stop any pending boot process */
1390 flush_scheduled_work(); 1382 flush_scheduled_work();
@@ -1641,9 +1633,7 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
1641 if (ret < 0) 1633 if (ret < 0)
1642 return ret; 1634 return ret;
1643 1635
1644 /* ADI930 has only 2 interfaces and inbound traffic 1636 /* ADI930 has only 2 interfaces and inbound traffic is on interface 1 */
1645 * is on interface 1
1646 */
1647 if (UEA_CHIP_VERSION(id) != ADI930) { 1637 if (UEA_CHIP_VERSION(id) != ADI930) {
1648 /* interface 2 is for inbound traffic */ 1638 /* interface 2 is for inbound traffic */
1649 ret = claim_interface(usb, usbatm, UEA_DS_IFACE_NO); 1639 ret = claim_interface(usb, usbatm, UEA_DS_IFACE_NO);