Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e40abaf6 authored by Matthieu CASTET's avatar Matthieu CASTET Committed by Greg Kroah-Hartman
Browse files

[PATCH] UEAGLE : cosmetic



this patch is purely cosmetic. There is :
- indentation cleaning
- unneeded cast removing
- comments cleaning

Signed-off-by: default avatarMatthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3c9666cc
Loading
Loading
Loading
Loading
+11 −21
Original line number Diff line number Diff line
@@ -632,8 +632,7 @@ static int request_dsp(struct uea_softc *sc)
			dsp_name = FW_DIR "DSPep.bin";
	}

	ret = request_firmware(&sc->dsp_firm,
				dsp_name, &sc->usb_dev->dev);
	ret = request_firmware(&sc->dsp_firm, dsp_name, &sc->usb_dev->dev);
	if (ret < 0) {
		uea_err(INS_TO_USBDEV(sc),
		       "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 == 0) ? -ETIMEDOUT : 0;

}

#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);
	if (ret < 0) {
		uea_err(INS_TO_USBDEV(sc),
@@ -1198,9 +1195,7 @@ static int load_XILINX_firmware(struct uea_softc *sc)
		goto err1;
	}

	/*
	 * Tell the modem we finish : de-assert reset
	 */
	/* Tell the modem we finish : de-assert reset */
	value = 0;
	ret = uea_send_modem_cmd(sc->usb_dev, 0xe, 1, &value);
	if (ret < 0)
@@ -1214,6 +1209,7 @@ static int load_XILINX_firmware(struct uea_softc *sc)
	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)
{
	uea_enters(INS_TO_USBDEV(sc));
@@ -1273,23 +1269,19 @@ static void uea_dispatch_cmv(struct uea_softc *sc, struct cmv* cmv)
 */
static void uea_intr(struct urb *urb, struct pt_regs *regs)
{
	struct uea_softc *sc = (struct uea_softc *)urb->context;
	struct intr_pkt *intr;
	struct uea_softc *sc = urb->context;
	struct intr_pkt *intr = urb->transfer_buffer;
	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",
		       urb->status);
		return;
	}

	intr = (struct intr_pkt *) urb->transfer_buffer;

	/* device-to-host interrupt */
	if (intr->bType != 0x08 || sc->booting) {
		uea_err(INS_TO_USBDEV(sc), "wrong intr\n");
		// rebooting ?
		// sc->reset = 1;
		uea_err(INS_TO_USBDEV(sc), "wrong interrupt\n");
		goto resubmit;
	}

@@ -1305,7 +1297,7 @@ static void uea_intr(struct urb *urb, struct pt_regs *regs)
		break;

	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));
	}

@@ -1384,7 +1376,7 @@ static void uea_stop(struct uea_softc *sc)
	int ret;
	uea_enters(INS_TO_USBDEV(sc));
	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 */
	flush_scheduled_work();
@@ -1641,9 +1633,7 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
	if (ret < 0)
		return ret;

	/* ADI930 has only 2 interfaces and inbound traffic
	 * is on interface 1
	 */
	/* ADI930 has only 2 interfaces and inbound traffic is on interface 1 */
	if (UEA_CHIP_VERSION(id) != ADI930) {
		/* interface 2 is for inbound traffic */
		ret = claim_interface(usb, usbatm, UEA_DS_IFACE_NO);