Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306154
b: refs/heads/master
c: f4d4e76
h: refs/heads/master
v: v3
  • Loading branch information
Ezequiel García authored and Mauro Carvalho Chehab committed Apr 10, 2012
1 parent 040900e commit d2fb9dc
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 769af2146a93c27c8834dbca54c02cd67468036d
refs/heads/master: f4d4e7656b26a6013bc5072c946920d2e2c44e8e
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/em28xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ config VIDEO_EM28XX_DVB
Empiatech em28xx chips.

config VIDEO_EM28XX_RC
bool "EM28XX Remote Controller support"
tristate "EM28XX Remote Controller support"
depends on RC_CORE
depends on VIDEO_EM28XX
depends on !(RC_CORE=m && VIDEO_EM28XX=y)
default y
default VIDEO_EM28XX
---help---
Enables Remote Controller support on em28xx driver.
5 changes: 2 additions & 3 deletions trunk/drivers/media/video/em28xx/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
em28xx-y := em28xx-video.o em28xx-i2c.o em28xx-cards.o
em28xx-y += em28xx-core.o em28xx-vbi.o

em28xx-$(CONFIG_VIDEO_EM28XX_RC) += em28xx-input.o

em28xx-alsa-objs := em28xx-audio.o
em28xx-rc-objs := em28xx-input.o

obj-$(CONFIG_VIDEO_EM28XX) += em28xx.o
obj-$(CONFIG_VIDEO_EM28XX_ALSA) += em28xx-alsa.o
obj-$(CONFIG_VIDEO_EM28XX_DVB) += em28xx-dvb.o
obj-$(CONFIG_VIDEO_EM28XX_RC) += em28xx-rc.o

ccflags-y += -Idrivers/media/video
ccflags-y += -Idrivers/media/common/tuners
ccflags-y += -Idrivers/media/dvb/dvb-core
ccflags-y += -Idrivers/media/dvb/frontends

8 changes: 2 additions & 6 deletions trunk/drivers/media/video/em28xx/em28xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -2874,9 +2874,6 @@ void em28xx_card_setup(struct em28xx *dev)
}

em28xx_tuner_setup(dev);

if(!disable_ir)
em28xx_ir_init(dev);
}


Expand All @@ -2893,6 +2890,8 @@ static void request_module_async(struct work_struct *work)

if (dev->board.has_dvb)
request_module("em28xx-dvb");
if (dev->board.has_ir_i2c && !disable_ir)
request_module("em28xx-rc");
}

static void request_modules(struct em28xx *dev)
Expand All @@ -2917,9 +2916,6 @@ static void flush_request_modules(struct em28xx *dev)
*/
void em28xx_release_resources(struct em28xx *dev)
{
if (dev->ir)
em28xx_ir_fini(dev);

/*FIXME: I2C IR should be disconnected */

em28xx_release_analog_resources(dev);
Expand Down
27 changes: 25 additions & 2 deletions trunk/drivers/media/video/em28xx/em28xx-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ static void em28xx_deregister_snapshot_button(struct em28xx *dev)
return;
}

int em28xx_ir_init(struct em28xx *dev)
static int em28xx_ir_init(struct em28xx *dev)
{
struct em28xx_IR *ir;
struct rc_dev *rc;
Expand Down Expand Up @@ -599,7 +599,7 @@ int em28xx_ir_init(struct em28xx *dev)
return err;
}

int em28xx_ir_fini(struct em28xx *dev)
static int em28xx_ir_fini(struct em28xx *dev)
{
struct em28xx_IR *ir = dev->ir;

Expand All @@ -618,3 +618,26 @@ int em28xx_ir_fini(struct em28xx *dev)
return 0;
}

static struct em28xx_ops rc_ops = {
.id = EM28XX_RC,
.name = "Em28xx Input Extension",
.init = em28xx_ir_init,
.fini = em28xx_ir_fini,
};

static int __init em28xx_rc_register(void)
{
return em28xx_register_extension(&rc_ops);
}

static void __exit em28xx_rc_unregister(void)
{
em28xx_unregister_extension(&rc_ops);
}

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
MODULE_DESCRIPTION("Em28xx Input driver");

module_init(em28xx_rc_register);
module_exit(em28xx_rc_unregister);
15 changes: 1 addition & 14 deletions trunk/drivers/media/video/em28xx/em28xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ enum em28xx_dev_state {
/* em28xx extensions */
#define EM28XX_AUDIO 0x10
#define EM28XX_DVB 0x20
#define EM28XX_RC 0x30

/* em28xx resource types (used for res_get/res_lock etc */
#define EM28XX_RESOURCE_VIDEO 0x01
Expand Down Expand Up @@ -705,20 +706,6 @@ extern const unsigned int em28xx_bcount;
int em28xx_tuner_callback(void *ptr, int component, int command, int arg);
void em28xx_release_resources(struct em28xx *dev);

/* Provided by em28xx-input.c */

#ifdef CONFIG_VIDEO_EM28XX_RC

int em28xx_ir_init(struct em28xx *dev);
int em28xx_ir_fini(struct em28xx *dev);

#else

static inline int em28xx_ir_init(struct em28xx *dev) { return 0; }
static inline int em28xx_ir_fini(struct em28xx *dev) { return 0; }

#endif

/* Provided by em28xx-vbi.c */
extern struct videobuf_queue_ops em28xx_vbi_qops;

Expand Down

0 comments on commit d2fb9dc

Please sign in to comment.