summaryrefslogtreecommitdiffstats
path: root/drivers/media/IR
diff options
context:
space:
mode:
authorDavid Härdeman2010-10-29 21:08:12 +0200
committerMauro Carvalho Chehab2010-12-29 11:16:36 +0100
commit3ffea4988be3f3fa65f2104ba31eff2b5e0e82a0 (patch)
tree615e94196988cf5c37eeb80953d98fa4d9b91527 /drivers/media/IR
parent[media] ir-core: remove remaining users of the ir-functions keyhandlers (diff)
downloadkernel-qcow2-linux-3ffea4988be3f3fa65f2104ba31eff2b5e0e82a0.tar.gz
kernel-qcow2-linux-3ffea4988be3f3fa65f2104ba31eff2b5e0e82a0.tar.xz
kernel-qcow2-linux-3ffea4988be3f3fa65f2104ba31eff2b5e0e82a0.zip
[media] ir-core: more cleanups of ir-functions.c
cx88 only depends on VIDEO_IR because it needs ir_extract_bits(). Move that function to ir-core.h and make it inline. Lots of drivers had dependencies on VIDEO_IR when they really wanted IR_CORE. The only remaining drivers to depend on VIDEO_IR are bt8xx and saa7134 (ir_rc5_timer_end is the only function exported by ir-functions). Rename VIDEO_IR -> IR_LEGACY to give a hint to anyone writing or converting drivers to IR_CORE that they do not want a dependency on IR_LEGACY. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR')
-rw-r--r--drivers/media/IR/Kconfig2
-rw-r--r--drivers/media/IR/Makefile2
-rw-r--r--drivers/media/IR/ir-functions.c19
3 files changed, 2 insertions, 21 deletions
diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig
index aa4163eb7a83..20e02a0a5e48 100644
--- a/drivers/media/IR/Kconfig
+++ b/drivers/media/IR/Kconfig
@@ -10,7 +10,7 @@ menuconfig IR_CORE
if you don't need IR, as otherwise, you may not be able to
compile the driver for your adapter.
-config VIDEO_IR
+config IR_LEGACY
tristate
depends on IR_CORE
default IR_CORE
diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile
index f9574adab82a..38873cff3429 100644
--- a/drivers/media/IR/Makefile
+++ b/drivers/media/IR/Makefile
@@ -4,7 +4,7 @@ ir-core-objs := ir-keytable.o ir-sysfs.o ir-raw-event.o rc-map.o
obj-y += keymaps/
obj-$(CONFIG_IR_CORE) += ir-core.o
-obj-$(CONFIG_VIDEO_IR) += ir-common.o
+obj-$(CONFIG_IR_LEGACY) += ir-common.o
obj-$(CONFIG_LIRC) += lirc_dev.o
obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
diff --git a/drivers/media/IR/ir-functions.c b/drivers/media/IR/ir-functions.c
index fca734c43e8d..ec021c92527a 100644
--- a/drivers/media/IR/ir-functions.c
+++ b/drivers/media/IR/ir-functions.c
@@ -31,25 +31,6 @@
MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
MODULE_LICENSE("GPL");
-/* -------------------------------------------------------------------------- */
-/* extract mask bits out of data and pack them into the result */
-u32 ir_extract_bits(u32 data, u32 mask)
-{
- u32 vbit = 1, value = 0;
-
- do {
- if (mask&1) {
- if (data&1)
- value |= vbit;
- vbit<<=1;
- }
- data>>=1;
- } while (mask>>=1);
-
- return value;
-}
-EXPORT_SYMBOL_GPL(ir_extract_bits);
-
/* RC5 decoding stuff, moved from bttv-input.c to share it with
* saa7134 */