diff options
| author | Andy Shevchenko <andy.shevchenko@gmail.com> | 2010-07-27 08:32:49 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 22:43:06 -0400 |
| commit | af5458b91f99ce5a29f670379a6d7a9e69014def (patch) | |
| tree | 7023e26ebd903307683583c7c32e76295b9f63b4 | |
| parent | c75079cc2addedf958358b88306591a5f9c4fb00 (diff) | |
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>
| -rw-r--r-- | drivers/media/video/usbvideo/usbvideo.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c index 5ac37c6c4313..f1fcf9744961 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, | |||
| 282 | }; | 282 | }; |
| 283 | unsigned short digit; | 283 | unsigned short digit; |
| 284 | int ix, iy; | 284 | int ix, iy; |
| 285 | int value; | ||
| 285 | 286 | ||
| 286 | if ((uvd == NULL) || (frame == NULL)) | 287 | if ((uvd == NULL) || (frame == NULL)) |
| 287 | return; | 288 | return; |
| 288 | 289 | ||
| 289 | if (ch >= '0' && ch <= '9') | 290 | value = hex_to_bin(ch); |
| 290 | ch -= '0'; | 291 | if (value < 0) |
| 291 | else if (ch >= 'A' && ch <= 'F') | ||
| 292 | ch = 10 + (ch - 'A'); | ||
| 293 | else if (ch >= 'a' && ch <= 'f') | ||
| 294 | ch = 10 + (ch - 'a'); | ||
| 295 | else | ||
| 296 | return; | 292 | return; |
| 297 | digit = digits[ch]; | 293 | digit = digits[value]; |
| 298 | 294 | ||
| 299 | for (iy=0; iy < 5; iy++) { | 295 | for (iy=0; iy < 5; iy++) { |
| 300 | for (ix=0; ix < 3; ix++) { | 296 | for (ix=0; ix < 3; ix++) { |
