Skip to content

Commit

Permalink
V4L/DVB (13119): gspca - pac7311: remove magic value for USB_BUF_SZ
Browse files Browse the repository at this point in the history
The length check in reg_w_var() function is because the buffer contents
is copied to gspca_dev->usb_buf which has the size of USB_BUF_SZ bytes as
defined in drivers/media/video/gspca/gspca.h. Replace the number with
symbol for better readability and maintainability.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Marton Nemeth authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 5a2e8d9 commit 24067bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/gspca/pac7311.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ static void reg_w_var(struct gspca_dev *gspca_dev,
reg_w_page(gspca_dev, page3_7302, sizeof page3_7302);
break;
default:
if (len > 64) {
if (len > USB_BUF_SZ) {
PDEBUG(D_ERR|D_STREAM,
"Incorrect variable sequence");
return;
Expand Down

0 comments on commit 24067bb

Please sign in to comment.