Skip to content

Commit

Permalink
V4L/DVB: drivers: usbvideo: remove custom implementation of hex_to_bin()
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Andy Shevchenko authored and Mauro Carvalho Chehab committed Aug 9, 2010
1 parent c75079c commit af5458b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/media/video/usbvideo/usbvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,15 @@ static void usbvideo_OverlayChar(struct uvd *uvd, struct usbvideo_frame *frame,
};
unsigned short digit;
int ix, iy;
int value;

if ((uvd == NULL) || (frame == NULL))
return;

if (ch >= '0' && ch <= '9')
ch -= '0';
else if (ch >= 'A' && ch <= 'F')
ch = 10 + (ch - 'A');
else if (ch >= 'a' && ch <= 'f')
ch = 10 + (ch - 'a');
else
value = hex_to_bin(ch);
if (value < 0)
return;
digit = digits[ch];
digit = digits[value];

for (iy=0; iy < 5; iy++) {
for (ix=0; ix < 3; ix++) {
Expand Down

0 comments on commit af5458b

Please sign in to comment.