Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ffea498 authored by David Härdeman's avatar David Härdeman Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarDavid Härdeman <david@hardeman.nu>
Acked-by: default avatarJarod Wilson <jarod@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 62c65031
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -10,7 +10,7 @@ menuconfig IR_CORE
	  if you don't need IR, as otherwise, you may not be able to
	  if you don't need IR, as otherwise, you may not be able to
	  compile the driver for your adapter.
	  compile the driver for your adapter.


config VIDEO_IR
config IR_LEGACY
	tristate
	tristate
	depends on IR_CORE
	depends on IR_CORE
	default IR_CORE
	default IR_CORE
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,7 @@ ir-core-objs := ir-keytable.o ir-sysfs.o ir-raw-event.o rc-map.o
obj-y += keymaps/
obj-y += keymaps/


obj-$(CONFIG_IR_CORE) += ir-core.o
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_LIRC) += lirc_dev.o
obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
+0 −19
Original line number Original line Diff line number Diff line
@@ -31,25 +31,6 @@
MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
MODULE_LICENSE("GPL");
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
/* RC5 decoding stuff, moved from bttv-input.c to share it with
 * saa7134 */
 * saa7134 */


+1 −2
Original line number Original line Diff line number Diff line
config DVB_DM1105
config DVB_DM1105
	tristate "SDMC DM1105 based PCI cards"
	tristate "SDMC DM1105 based PCI cards"
	depends on DVB_CORE && PCI && I2C
	depends on DVB_CORE && PCI && I2C
	depends on INPUT
	select DVB_PLL if !DVB_FE_CUSTOMISE
	select DVB_PLL if !DVB_FE_CUSTOMISE
	select DVB_STV0299 if !DVB_FE_CUSTOMISE
	select DVB_STV0299 if !DVB_FE_CUSTOMISE
	select DVB_STV0288 if !DVB_FE_CUSTOMISE
	select DVB_STV0288 if !DVB_FE_CUSTOMISE
@@ -9,7 +8,7 @@ config DVB_DM1105
	select DVB_CX24116 if !DVB_FE_CUSTOMISE
	select DVB_CX24116 if !DVB_FE_CUSTOMISE
	select DVB_SI21XX if !DVB_FE_CUSTOMISE
	select DVB_SI21XX if !DVB_FE_CUSTOMISE
	select DVB_DS3000 if !DVB_FE_CUSTOMISE
	select DVB_DS3000 if !DVB_FE_CUSTOMISE
	depends on VIDEO_IR
	depends on IR_CORE
	help
	help
	  Support for cards based on the SDMC DM1105 PCI chip like
	  Support for cards based on the SDMC DM1105 PCI chip like
	  DvbWorld 2002
	  DvbWorld 2002
+1 −2
Original line number Original line Diff line number Diff line
@@ -89,7 +89,6 @@ config DVB_BUDGET
config DVB_BUDGET_CI
config DVB_BUDGET_CI
	tristate "Budget cards with onboard CI connector"
	tristate "Budget cards with onboard CI connector"
	depends on DVB_BUDGET_CORE && I2C
	depends on DVB_BUDGET_CORE && I2C
	depends on INPUT # due to IR
	select DVB_STV0297 if !DVB_FE_CUSTOMISE
	select DVB_STV0297 if !DVB_FE_CUSTOMISE
	select DVB_STV0299 if !DVB_FE_CUSTOMISE
	select DVB_STV0299 if !DVB_FE_CUSTOMISE
	select DVB_TDA1004X if !DVB_FE_CUSTOMISE
	select DVB_TDA1004X if !DVB_FE_CUSTOMISE
@@ -98,7 +97,7 @@ config DVB_BUDGET_CI
	select DVB_LNBP21 if !DVB_FE_CUSTOMISE
	select DVB_LNBP21 if !DVB_FE_CUSTOMISE
	select DVB_TDA10023 if !DVB_FE_CUSTOMISE
	select DVB_TDA10023 if !DVB_FE_CUSTOMISE
	select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMISE
	select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMISE
	depends on VIDEO_IR
	depends on IR_CORE
	help
	help
	  Support for simple SAA7146 based DVB cards
	  Support for simple SAA7146 based DVB cards
	  (so called Budget- or Nova-PCI cards) without onboard
	  (so called Budget- or Nova-PCI cards) without onboard
Loading