aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorAndy Shevchenko <andy.shevchenko@gmail.com>2010-07-27 09:32:49 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-08 23:43:06 -0300
commitaf5458b91f99ce5a29f670379a6d7a9e69014def (patch)
tree7023e26ebd903307683583c7c32e76295b9f63b4 /drivers/media
parentc75079cc2addedf958358b88306591a5f9c4fb00 (diff)
downloadkernel_samsung_crespo-af5458b91f99ce5a29f670379a6d7a9e69014def.zip
kernel_samsung_crespo-af5458b91f99ce5a29f670379a6d7a9e69014def.tar.gz
kernel_samsung_crespo-af5458b91f99ce5a29f670379a6d7a9e69014def.tar.bz2
V4L/DVB: drivers: usbvideo: remove custom implementation of hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/usbvideo/usbvideo.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c
index 5ac37c6..f1fcf97 100644
--- a/drivers/media/video/usbvideo/usbvideo.c
+++ b/drivers/media/video/usbvideo/usbvideo.c
@@ -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++) {