Commit af5458b9 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mauro Carvalho Chehab

V4L/DVB: drivers: usbvideo: remove custom implementation of hex_to_bin()

Signed-off-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c75079cc
...@@ -282,19 +282,15 @@ static void usbvideo_OverlayChar(struct uvd *uvd, struct usbvideo_frame *frame, ...@@ -282,19 +282,15 @@ static void usbvideo_OverlayChar(struct uvd *uvd, struct usbvideo_frame *frame,
}; };
unsigned short digit; unsigned short digit;
int ix, iy; int ix, iy;
int value;
if ((uvd == NULL) || (frame == NULL)) if ((uvd == NULL) || (frame == NULL))
return; return;
if (ch >= '0' && ch <= '9') value = hex_to_bin(ch);
ch -= '0'; if (value < 0)
else if (ch >= 'A' && ch <= 'F')
ch = 10 + (ch - 'A');
else if (ch >= 'a' && ch <= 'f')
ch = 10 + (ch - 'a');
else
return; return;
digit = digits[ch]; digit = digits[value];
for (iy=0; iy < 5; iy++) { for (iy=0; iy < 5; iy++) {
for (ix=0; ix < 3; ix++) { for (ix=0; ix < 3; ix++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment