[PATCH] media: usb: s2255: endian fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Magic number fix, endian fix, and comment style change.
This patch depends on "PATCH] media: usb: s2255: custom V4L2_CIDs"

Signed-off-by: Dean Anderson <dean@xxxxxxxxxxxx>

---
 drivers/media/usb/s2255/s2255drv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index 1c7cb1d37353..ce6fb6c4481c 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -60,6 +60,7 @@
 #define S2255_MIN_BUFS          2
 #define S2255_SETMODE_TIMEOUT   500
 #define S2255_VIDSTATUS_TIMEOUT 350
+#define S2255_MARKER_FIRMWARE	cpu_to_le32(0xDDCCBBAAL)
 #define S2255_MARKER_FRAME	cpu_to_le32(0x2255DA4AL)
 #define S2255_MARKER_RESPONSE	cpu_to_le32(0x2255ACACL)
 #define S2255_RESPONSE_SETMODE  cpu_to_le32(0x01)
@@ -1276,8 +1277,8 @@ static int s2255_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 		kfree(outbuf);
 		return rc;
 	}
-	// verify marker code
-	if (*(unsigned int *)outbuf != 0xddccbbaa) {
+	/* verify marker code */
+	if (*(__le32 *)outbuf != S2255_MARKER_FIRMWARE) {
 		kfree(outbuf);
 		return -EFAULT;
 	}
-- 
2.30.2





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux