svn commit: r253807 - head/sys/dev/usb/wlan

Rui Paulo rpaulo at FreeBSD.org
Tue Jul 30 16:17:31 UTC 2013


Author: rpaulo
Date: Tue Jul 30 16:17:30 2013
New Revision: 253807
URL: http://svnweb.freebsd.org/changeset/base/253807

Log:
  Unbreak sparc64 LINT. Need to fix this correctly at some point in the future.

Modified:
  head/sys/dev/usb/wlan/if_rsu.c

Modified: head/sys/dev/usb/wlan/if_rsu.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rsu.c	Tue Jul 30 14:50:44 2013	(r253806)
+++ head/sys/dev/usb/wlan/if_rsu.c	Tue Jul 30 16:17:30 2013	(r253807)
@@ -2077,7 +2077,7 @@ rsu_power_off(struct rsu_softc *sc)
 }
 
 static int
-rsu_fw_loadsection(struct rsu_softc *sc, uint8_t *buf, int len)
+rsu_fw_loadsection(struct rsu_softc *sc, const uint8_t *buf, int len)
 {
 	struct rsu_data *data;
 	struct r92s_tx_desc *txd;
@@ -2111,9 +2111,9 @@ rsu_fw_loadsection(struct rsu_softc *sc,
 static int
 rsu_load_firmware(struct rsu_softc *sc)
 {
-	struct r92s_fw_hdr *hdr;
+	const struct r92s_fw_hdr *hdr;
 	struct r92s_fw_priv *dmem;
-	uint8_t *imem, *emem;
+	const uint8_t *imem, *emem;
 	int imemsz, ememsz;
 	const struct firmware *fw;
 	size_t size;
@@ -2136,7 +2136,7 @@ rsu_load_firmware(struct rsu_softc *sc)
 		error = EINVAL;
 		goto fail;
 	}
-	hdr = (struct r92s_fw_hdr *)fw->data;
+	hdr = (const struct r92s_fw_hdr *)fw->data;
 	if (hdr->signature != htole16(0x8712) &&
 	    hdr->signature != htole16(0x8192)) {
 		device_printf(sc->sc_dev,
@@ -2163,7 +2163,7 @@ rsu_load_firmware(struct rsu_softc *sc)
 		error = EINVAL;
 		goto fail;
 	}
-	imem = (uint8_t *)&hdr[1];
+	imem = (const uint8_t *)&hdr[1];
 	emem = imem + imemsz;
 
 	/* Load IMEM section. */
@@ -2238,7 +2238,7 @@ rsu_load_firmware(struct rsu_softc *sc)
 	}
 
 	/* Update DMEM section before loading. */
-	dmem = &hdr->priv;
+	dmem = __DECONST(struct r92s_fw_priv *, &hdr->priv);
 	memset(dmem, 0, sizeof(*dmem));
 	dmem->hci_sel = R92S_HCI_SEL_USB | R92S_HCI_SEL_8172;
 	dmem->nendpoints = sc->npipes;


More information about the svn-src-all mailing list