media: usb: s2255: endian fix
PATCH 1/1 media: usb: s2255: endian fix
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 <[email protected]>
--- drivers/media/usb/s2255/s2255drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/media/usb/s2255/s2255drv.c +3 -2
@@ -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 ; }
Signature · 1 line
2.30.2