2 * Copyright 2010 Kshitij Kulshreshtha <kkhere.geo@gmail.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * Compatibility file for Linux wireless for kernels 2.6.35.
11 #include <linux/compat.h>
12 #include <linux/ctype.h>
15 * hex_to_bin - convert a hex digit to its real value
16 * @ch: ascii character represents hex digit
18 * hex_to_bin() converts one hex digit to its actual value or -1 in case of bad
21 int compat_hex_to_bin(char ch)
23 if ((ch >= '0') && (ch <= '9'))
26 if ((ch >= 'a') && (ch <= 'f'))
30 EXPORT_SYMBOL_GPL(compat_hex_to_bin);
32 #ifndef CONFIG_COMPAT_RHEL_6_4
34 * noop_llseek - No Operation Performed llseek implementation
35 * @file: file structure to seek on
36 * @offset: file offset to seek to
37 * @origin: type of seek
39 * This is an implementation of ->llseek useable for the rare special case when
40 * userspace expects the seek to succeed but the (device) file is actually not
41 * able to perform the seek. In this case you use noop_llseek() instead of
42 * falling back to the default implementation of ->llseek.
44 loff_t noop_llseek(struct file *file, loff_t offset, int origin)
48 EXPORT_SYMBOL_GPL(noop_llseek);
49 #endif /* CONFIG_COMPAT_RHEL_6_4 */