* [PATCH 00/10] rc-core: various cleanups
@ 2010-11-19 23:42 David Härdeman
2010-11-19 23:42 ` [PATCH 01/10] saa7134: remove unused module parameter David Härdeman
` (9 more replies)
0 siblings, 10 replies; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:42 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
Here's a set of smaller patches which performs various cleanups, mostly to
the saa7134 and bttv driver. They are based on the media_tree.git repo
(2.6.38 branch) on top of Mauro's recent renaming patches.
---
David Härdeman (10):
saa7134: remove unused module parameter
saa7134: use full keycode for BeholdTV
saa7134: some minor cleanups
saa7134: merge saa7134_card_ir->timer and saa7134_card_ir->timer_end
saa7134: protect the ir user count
saa7134: make module parameters boolean
bttv: rename struct card_ir to bttv_ir
bttv: merge ir decoding timers
mceusb: int to bool conversion
rc-core: fix some leftovers from the renaming patches
drivers/media/rc/ir-raw.c | 2
drivers/media/rc/keymaps/rc-behold.c | 70 +++++++-------
drivers/media/rc/mceusb.c | 62 +++++--------
drivers/media/rc/rc-core-priv.h | 6 +
drivers/media/rc/rc-main.c | 2
drivers/media/video/bt8xx/bttv-input.c | 31 +++---
drivers/media/video/bt8xx/bttvp.h | 32 ++----
drivers/media/video/saa7134/saa7134-input.c | 133 +++++++++++----------------
drivers/media/video/saa7134/saa7134.h | 6 +
include/media/rc-core.h | 12 +-
10 files changed, 154 insertions(+), 202 deletions(-)
--
David Härdeman
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 01/10] saa7134: remove unused module parameter
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
@ 2010-11-19 23:42 ` David Härdeman
2010-11-19 23:42 ` [PATCH 02/10] saa7134: use full keycode for BeholdTV David Härdeman
` (8 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:42 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
ir_rc5_remote_gap is a leftover from ir-common, remove it.
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/video/saa7134/saa7134-input.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index f3f4aff..4fdc165 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -41,9 +41,6 @@ static int pinnacle_remote;
module_param(pinnacle_remote, int, 0644); /* Choose Pinnacle PCTV remote */
MODULE_PARM_DESC(pinnacle_remote, "Specify Pinnacle PCTV remote: 0=coloured, 1=grey (defaults to 0)");
-static int ir_rc5_remote_gap = 885;
-module_param(ir_rc5_remote_gap, int, 0644);
-
static unsigned int disable_other_ir;
module_param(disable_other_ir, int, 0644);
MODULE_PARM_DESC(disable_other_ir, "disable full codes of "
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 02/10] saa7134: use full keycode for BeholdTV
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
2010-11-19 23:42 ` [PATCH 01/10] saa7134: remove unused module parameter David Härdeman
@ 2010-11-19 23:42 ` David Härdeman
2010-11-19 23:42 ` [PATCH 03/10] saa7134: some minor cleanups David Härdeman
` (7 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:42 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
Using the full keycode for BeholdTV hardware makes another module
parameter unnecessary.
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/rc/keymaps/rc-behold.c | 70 ++++++++++++++-------------
drivers/media/video/saa7134/saa7134-input.c | 19 +------
2 files changed, 37 insertions(+), 52 deletions(-)
diff --git a/drivers/media/rc/keymaps/rc-behold.c b/drivers/media/rc/keymaps/rc-behold.c
index ae4d235..c64c356 100644
--- a/drivers/media/rc/keymaps/rc-behold.c
+++ b/drivers/media/rc/keymaps/rc-behold.c
@@ -29,8 +29,8 @@ static struct rc_map_table behold[] = {
/* 0x1c 0x12 *
* TV/FM POWER *
* */
- { 0x1c, KEY_TUNER }, /* XXX KEY_TV / KEY_RADIO */
- { 0x12, KEY_POWER },
+ { 0x6b861c, KEY_TUNER }, /* XXX KEY_TV / KEY_RADIO */
+ { 0x6b8612, KEY_POWER },
/* 0x01 0x02 0x03 *
* 1 2 3 *
@@ -41,28 +41,28 @@ static struct rc_map_table behold[] = {
* 0x07 0x08 0x09 *
* 7 8 9 *
* */
- { 0x01, KEY_1 },
- { 0x02, KEY_2 },
- { 0x03, KEY_3 },
- { 0x04, KEY_4 },
- { 0x05, KEY_5 },
- { 0x06, KEY_6 },
- { 0x07, KEY_7 },
- { 0x08, KEY_8 },
- { 0x09, KEY_9 },
+ { 0x6b8601, KEY_1 },
+ { 0x6b8602, KEY_2 },
+ { 0x6b8603, KEY_3 },
+ { 0x6b8604, KEY_4 },
+ { 0x6b8605, KEY_5 },
+ { 0x6b8606, KEY_6 },
+ { 0x6b8607, KEY_7 },
+ { 0x6b8608, KEY_8 },
+ { 0x6b8609, KEY_9 },
/* 0x0a 0x00 0x17 *
* RECALL 0 MODE *
* */
- { 0x0a, KEY_AGAIN },
- { 0x00, KEY_0 },
- { 0x17, KEY_MODE },
+ { 0x6b860a, KEY_AGAIN },
+ { 0x6b8600, KEY_0 },
+ { 0x6b8617, KEY_MODE },
/* 0x14 0x10 *
* ASPECT FULLSCREEN *
* */
- { 0x14, KEY_SCREEN },
- { 0x10, KEY_ZOOM },
+ { 0x6b8614, KEY_SCREEN },
+ { 0x6b8610, KEY_ZOOM },
/* 0x0b *
* Up *
@@ -73,17 +73,17 @@ static struct rc_map_table behold[] = {
* 0x015 *
* Down *
* */
- { 0x0b, KEY_CHANNELUP },
- { 0x18, KEY_VOLUMEDOWN },
- { 0x16, KEY_OK }, /* XXX KEY_ENTER */
- { 0x0c, KEY_VOLUMEUP },
- { 0x15, KEY_CHANNELDOWN },
+ { 0x6b860b, KEY_CHANNELUP },
+ { 0x6b8618, KEY_VOLUMEDOWN },
+ { 0x6b8616, KEY_OK }, /* XXX KEY_ENTER */
+ { 0x6b860c, KEY_VOLUMEUP },
+ { 0x6b8615, KEY_CHANNELDOWN },
/* 0x11 0x0d *
* MUTE INFO *
* */
- { 0x11, KEY_MUTE },
- { 0x0d, KEY_INFO },
+ { 0x6b8611, KEY_MUTE },
+ { 0x6b860d, KEY_INFO },
/* 0x0f 0x1b 0x1a *
* RECORD PLAY/PAUSE STOP *
@@ -92,26 +92,26 @@ static struct rc_map_table behold[] = {
*TELETEXT AUDIO SOURCE *
* RED YELLOW *
* */
- { 0x0f, KEY_RECORD },
- { 0x1b, KEY_PLAYPAUSE },
- { 0x1a, KEY_STOP },
- { 0x0e, KEY_TEXT },
- { 0x1f, KEY_RED }, /*XXX KEY_AUDIO */
- { 0x1e, KEY_YELLOW }, /*XXX KEY_SOURCE */
+ { 0x6b860f, KEY_RECORD },
+ { 0x6b861b, KEY_PLAYPAUSE },
+ { 0x6b861a, KEY_STOP },
+ { 0x6b860e, KEY_TEXT },
+ { 0x6b861f, KEY_RED }, /*XXX KEY_AUDIO */
+ { 0x6b861e, KEY_YELLOW }, /*XXX KEY_SOURCE */
/* 0x1d 0x13 0x19 *
* SLEEP PREVIEW DVB *
* GREEN BLUE *
* */
- { 0x1d, KEY_SLEEP },
- { 0x13, KEY_GREEN },
- { 0x19, KEY_BLUE }, /* XXX KEY_SAT */
+ { 0x6b861d, KEY_SLEEP },
+ { 0x6b8613, KEY_GREEN },
+ { 0x6b8619, KEY_BLUE }, /* XXX KEY_SAT */
/* 0x58 0x5c *
* FREEZE SNAPSHOT *
* */
- { 0x58, KEY_SLOW },
- { 0x5c, KEY_CAMERA },
+ { 0x6b8658, KEY_SLOW },
+ { 0x6b865c, KEY_CAMERA },
};
@@ -119,7 +119,7 @@ static struct rc_map_list behold_map = {
.map = {
.scan = behold,
.size = ARRAY_SIZE(behold),
- .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */
+ .ir_type = IR_TYPE_NEC,
.name = RC_MAP_BEHOLD,
}
};
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 4fdc165..10dc9ad 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -41,11 +41,6 @@ static int pinnacle_remote;
module_param(pinnacle_remote, int, 0644); /* Choose Pinnacle PCTV remote */
MODULE_PARM_DESC(pinnacle_remote, "Specify Pinnacle PCTV remote: 0=coloured, 1=grey (defaults to 0)");
-static unsigned int disable_other_ir;
-module_param(disable_other_ir, int, 0644);
-MODULE_PARM_DESC(disable_other_ir, "disable full codes of "
- "alternative remotes from other manufacturers");
-
#define dprintk(fmt, arg...) if (ir_debug) \
printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg)
#define i2cdprintk(fmt, arg...) if (ir_debug) \
@@ -282,22 +277,12 @@ static int get_key_beholdm6xx(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
i2cdprintk("read error\n");
return -EIO;
}
- /* IR of this card normally decode signals NEC-standard from
- * - Sven IHOO MT 5.1R remote. xxyye718
- * - Sven DVD HD-10xx remote. xxyyf708
- * - BBK ...
- * - mayby others
- * So, skip not our, if disable full codes mode.
- */
- if (data[10] != 0x6b && data[11] != 0x86 && disable_other_ir)
- return 0;
- /* Wrong data decode fix */
if (data[9] != (unsigned char)(~data[8]))
return 0;
- *ir_key = data[9];
- *ir_raw = data[9];
+ *ir_raw = ((data[10] << 16) | (data[11] << 8) | (data[9] << 0));
+ *ir_key = *ir_raw;
return 1;
}
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 03/10] saa7134: some minor cleanups
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
2010-11-19 23:42 ` [PATCH 01/10] saa7134: remove unused module parameter David Härdeman
2010-11-19 23:42 ` [PATCH 02/10] saa7134: use full keycode for BeholdTV David Härdeman
@ 2010-11-19 23:42 ` David Härdeman
2010-11-19 23:42 ` [PATCH 04/10] saa7134: merge saa7134_card_ir->timer and saa7134_card_ir->timer_end David Härdeman
` (6 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:42 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
Mostly using appropriate data types and constants (e.g. int -> bool).
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/video/saa7134/saa7134-input.c | 49 ++++++++++-----------------
drivers/media/video/saa7134/saa7134.h | 4 +-
2 files changed, 21 insertions(+), 32 deletions(-)
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 10dc9ad..d75c307 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -407,17 +407,16 @@ static int __saa7134_ir_start(void *priv)
struct saa7134_dev *dev = priv;
struct saa7134_card_ir *ir;
- if (!dev)
+ if (!dev || !dev->remote)
return -EINVAL;
ir = dev->remote;
- if (!ir)
- return -EINVAL;
-
if (ir->running)
return 0;
ir->running = true;
+ ir->active = false;
+
if (ir->polling) {
setup_timer(&ir->timer, saa7134_input_timer,
(unsigned long)dev);
@@ -425,10 +424,8 @@ static int __saa7134_ir_start(void *priv)
add_timer(&ir->timer);
} else if (ir->raw_decode) {
/* set timer_end for code completion */
- init_timer(&ir->timer_end);
- ir->timer_end.function = ir_raw_decode_timer_end;
- ir->timer_end.data = (unsigned long)dev;
- ir->active = false;
+ setup_timer(&ir->timer_end, ir_raw_decode_timer_end,
+ (unsigned long)dev);
}
return 0;
@@ -439,22 +436,19 @@ static void __saa7134_ir_stop(void *priv)
struct saa7134_dev *dev = priv;
struct saa7134_card_ir *ir;
- if (!dev)
+ if (!dev || !dev->remote)
return;
ir = dev->remote;
- if (!ir)
- return;
-
if (!ir->running)
return;
- if (dev->remote->polling)
- del_timer_sync(&dev->remote->timer);
- else if (ir->raw_decode) {
+
+ if (ir->polling)
+ del_timer_sync(&ir->timer);
+ else if (ir->raw_decode)
del_timer_sync(&ir->timer_end);
- ir->active = false;
- }
+ ir->active = false;
ir->running = false;
return;
@@ -499,8 +493,8 @@ int saa7134_input_init1(struct saa7134_dev *dev)
u32 mask_keycode = 0;
u32 mask_keydown = 0;
u32 mask_keyup = 0;
- int polling = 0;
- int raw_decode = 0;
+ unsigned polling = 0;
+ bool raw_decode = false;
int err;
if (dev->has_remote != SAA7134_REMOTE_GPIO)
@@ -565,14 +559,14 @@ int saa7134_input_init1(struct saa7134_dev *dev)
mask_keydown = 0x0040000; /* Enable GPIO18 line on both edges */
mask_keyup = 0x0040000;
mask_keycode = 0xffff;
- raw_decode = 1;
+ raw_decode = true;
break;
case SAA7134_BOARD_AVERMEDIA_M733A:
ir_codes = RC_MAP_AVERMEDIA_M733A_RM_K6;
mask_keydown = 0x0040000;
mask_keyup = 0x0040000;
mask_keycode = 0xffff;
- raw_decode = 1;
+ raw_decode = true;
break;
case SAA7134_BOARD_AVERMEDIA_777:
case SAA7134_BOARD_AVERMEDIA_A16AR:
@@ -679,7 +673,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
mask_keydown = 0x0040000; /* Enable GPIO18 line on both edges */
mask_keyup = 0x0040000;
mask_keycode = 0xffff;
- raw_decode = 1;
+ raw_decode = true;
break;
case SAA7134_BOARD_ENCORE_ENLTV:
case SAA7134_BOARD_ENCORE_ENLTV_FM:
@@ -693,7 +687,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
mask_keydown = 0x0040000; /* Enable GPIO18 line on both edges */
mask_keyup = 0x0040000;
mask_keycode = 0xffff;
- raw_decode = 1;
+ raw_decode = true;
break;
case SAA7134_BOARD_10MOONSTVMASTER3:
ir_codes = RC_MAP_ENCORE_ENLTV;
@@ -746,8 +740,6 @@ int saa7134_input_init1(struct saa7134_dev *dev)
ir->dev = rc;
dev->remote = ir;
- ir->running = false;
-
/* init hardware-specific stuff */
ir->mask_keycode = mask_keycode;
ir->mask_keydown = mask_keydown;
@@ -809,14 +801,12 @@ void saa7134_input_fini(struct saa7134_dev *dev)
void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
{
struct i2c_board_info info;
-
struct i2c_msg msg_msi = {
.addr = 0x50,
.flags = I2C_M_RD,
.len = 0,
.buf = NULL,
};
-
int rc;
if (disable_ir) {
@@ -916,8 +906,8 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
static int saa7134_raw_decode_irq(struct saa7134_dev *dev)
{
- struct saa7134_card_ir *ir = dev->remote;
- unsigned long timeout;
+ struct saa7134_card_ir *ir = dev->remote;
+ unsigned long timeout;
int space;
/* Generate initial event */
@@ -926,7 +916,6 @@ static int saa7134_raw_decode_irq(struct saa7134_dev *dev)
space = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2) & ir->mask_keydown;
ir_raw_event_store_edge(dev->remote->dev, space ? IR_SPACE : IR_PULSE);
-
/*
* Wait 15 ms from the start of the first IR event before processing
* the event. This time is enough for NEC protocol. May need adjustments
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 1923f3c..f93951a 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -124,7 +124,7 @@ struct saa7134_card_ir {
char name[32];
char phys[32];
- int users;
+ unsigned users;
u32 polling;
u32 last_gpio;
@@ -551,7 +551,7 @@ struct saa7134_dev {
/* infrared remote */
int has_remote;
- struct saa7134_card_ir *remote;
+ struct saa7134_card_ir *remote;
/* pci i/o */
char name[32];
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 04/10] saa7134: merge saa7134_card_ir->timer and saa7134_card_ir->timer_end
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
` (2 preceding siblings ...)
2010-11-19 23:42 ` [PATCH 03/10] saa7134: some minor cleanups David Härdeman
@ 2010-11-19 23:42 ` David Härdeman
2010-11-19 23:43 ` [PATCH 05/10] saa7134: protect the ir user count David Härdeman
` (5 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:42 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
Both timers are used for a similar purpose. Merging them allows for some
minor simplifications.
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/video/saa7134/saa7134-input.c | 10 ++++------
drivers/media/video/saa7134/saa7134.h | 1 -
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index d75c307..98678d9 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -420,11 +420,11 @@ static int __saa7134_ir_start(void *priv)
if (ir->polling) {
setup_timer(&ir->timer, saa7134_input_timer,
(unsigned long)dev);
- ir->timer.expires = jiffies + HZ;
+ ir->timer.expires = jiffies + HZ;
add_timer(&ir->timer);
} else if (ir->raw_decode) {
/* set timer_end for code completion */
- setup_timer(&ir->timer_end, ir_raw_decode_timer_end,
+ setup_timer(&ir->timer, ir_raw_decode_timer_end,
(unsigned long)dev);
}
@@ -443,10 +443,8 @@ static void __saa7134_ir_stop(void *priv)
if (!ir->running)
return;
- if (ir->polling)
+ if (ir->polling || ir->raw_decode)
del_timer_sync(&ir->timer);
- else if (ir->raw_decode)
- del_timer_sync(&ir->timer_end);
ir->active = false;
ir->running = false;
@@ -923,7 +921,7 @@ static int saa7134_raw_decode_irq(struct saa7134_dev *dev)
*/
if (!ir->active) {
timeout = jiffies + jiffies_to_msecs(15);
- mod_timer(&ir->timer_end, timeout);
+ mod_timer(&ir->timer, timeout);
ir->active = true;
}
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index f93951a..babfbe7 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -134,7 +134,6 @@ struct saa7134_card_ir {
bool active;
struct timer_list timer;
- struct timer_list timer_end; /* timer_end for code completion */
/* IR core raw decoding */
u32 raw_decode;
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 05/10] saa7134: protect the ir user count
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
` (3 preceding siblings ...)
2010-11-19 23:42 ` [PATCH 04/10] saa7134: merge saa7134_card_ir->timer and saa7134_card_ir->timer_end David Härdeman
@ 2010-11-19 23:43 ` David Härdeman
2010-11-19 23:43 ` [PATCH 06/10] saa7134: make module parameters boolean David Härdeman
` (4 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:43 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
The use of the saa7134_card_ir->users seems racy, so protect the count with
a spinlock. Also use proper data types as arguments to __saa7134_ir_start()
and __saa7134_ir_stop() to remove some unnecessary casts.
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/video/saa7134/saa7134-input.c | 54 ++++++++++++++++-----------
drivers/media/video/saa7134/saa7134.h | 1 +
2 files changed, 33 insertions(+), 22 deletions(-)
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 98678d9..8b80efb 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -402,17 +402,12 @@ static void ir_raw_decode_timer_end(unsigned long data)
ir->active = false;
}
-static int __saa7134_ir_start(void *priv)
+static void __saa7134_ir_start(struct saa7134_dev *dev)
{
- struct saa7134_dev *dev = priv;
- struct saa7134_card_ir *ir;
-
- if (!dev || !dev->remote)
- return -EINVAL;
+ struct saa7134_card_ir *ir = dev->remote;
- ir = dev->remote;
if (ir->running)
- return 0;
+ return;
ir->running = true;
ir->active = false;
@@ -427,19 +422,12 @@ static int __saa7134_ir_start(void *priv)
setup_timer(&ir->timer, ir_raw_decode_timer_end,
(unsigned long)dev);
}
-
- return 0;
}
-static void __saa7134_ir_stop(void *priv)
+static void __saa7134_ir_stop(struct saa7134_dev *dev)
{
- struct saa7134_dev *dev = priv;
- struct saa7134_card_ir *ir;
-
- if (!dev || !dev->remote)
- return;
+ struct saa7134_card_ir *ir = dev->remote;
- ir = dev->remote;
if (!ir->running)
return;
@@ -448,39 +436,60 @@ static void __saa7134_ir_stop(void *priv)
ir->active = false;
ir->running = false;
-
- return;
}
int saa7134_ir_start(struct saa7134_dev *dev)
{
+ if (!dev || !dev->remote)
+ return -EINVAL;
+
+ spin_lock(&dev->remote->lock);
if (dev->remote->users)
- return __saa7134_ir_start(dev);
+ __saa7134_ir_start(dev);
+ spin_unlock(&dev->remote->lock);
return 0;
}
void saa7134_ir_stop(struct saa7134_dev *dev)
{
+ if (!dev || !dev->remote)
+ return;
+
+ spin_lock(&dev->remote->lock);
if (dev->remote->users)
__saa7134_ir_stop(dev);
+ spin_unlock(&dev->remote->lock);
}
static int saa7134_ir_open(struct rc_dev *rc)
{
struct saa7134_dev *dev = rc->priv;
+ if (!dev || !dev->remote)
+ return -EINVAL;
+
+ spin_lock(&dev->remote->lock);
+ if (dev->remote->users == 0)
+ __saa7134_ir_start(dev);
dev->remote->users++;
- return __saa7134_ir_start(dev);
+ spin_unlock(&dev->remote->lock);
+
+ return 0;
}
static void saa7134_ir_close(struct rc_dev *rc)
{
struct saa7134_dev *dev = rc->priv;
+ if (!dev || !dev->remote)
+ return;
+
+ spin_lock(&dev->remote->lock);
dev->remote->users--;
- if (!dev->remote->users)
+ if (dev->remote->users == 0)
__saa7134_ir_stop(dev);
+ spin_unlock(&dev->remote->lock);
}
int saa7134_input_init1(struct saa7134_dev *dev)
@@ -744,6 +753,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
ir->mask_keyup = mask_keyup;
ir->polling = polling;
ir->raw_decode = raw_decode;
+ spin_lock_init(&ir->lock);
/* init input device */
snprintf(ir->name, sizeof(ir->name), "saa7134 IR (%s)",
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index babfbe7..7c836c3 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -125,6 +125,7 @@ struct saa7134_card_ir {
char name[32];
char phys[32];
unsigned users;
+ spinlock_t lock;
u32 polling;
u32 last_gpio;
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 06/10] saa7134: make module parameters boolean
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
` (4 preceding siblings ...)
2010-11-19 23:43 ` [PATCH 05/10] saa7134: protect the ir user count David Härdeman
@ 2010-11-19 23:43 ` David Härdeman
2010-11-20 6:10 ` hermann pitton
2010-11-19 23:43 ` [PATCH 07/10] bttv: rename struct card_ir to bttv_ir David Härdeman
` (3 subsequent siblings)
9 siblings, 1 reply; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:43 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
int to bool conversion for module parameters which are truely boolean.
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/video/saa7134/saa7134-input.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 8b80efb..aea74e2 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -29,12 +29,12 @@
#define MODULE_NAME "saa7134"
-static unsigned int disable_ir;
-module_param(disable_ir, int, 0444);
+static bool disable_ir;
+module_param(disable_ir, bool, 0444);
MODULE_PARM_DESC(disable_ir,"disable infrared remote support");
-static unsigned int ir_debug;
-module_param(ir_debug, int, 0644);
+static bool ir_debug;
+module_param(ir_debug, bool, 0644);
MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]");
static int pinnacle_remote;
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 07/10] bttv: rename struct card_ir to bttv_ir
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
` (5 preceding siblings ...)
2010-11-19 23:43 ` [PATCH 06/10] saa7134: make module parameters boolean David Härdeman
@ 2010-11-19 23:43 ` David Härdeman
2010-11-19 23:43 ` [PATCH 08/10] bttv: merge ir decoding timers David Härdeman
` (2 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:43 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
bttv_ir is more consistent with all other structs used in the same driver.
Also, clean up the struct to remove commented out members and the work_struct
which is unused.
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/video/bt8xx/bttv-input.c | 27 +++++++++++++--------------
drivers/media/video/bt8xx/bttvp.h | 31 +++++++++----------------------
2 files changed, 22 insertions(+), 36 deletions(-)
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c
index 773ee6a..c8bf423 100644
--- a/drivers/media/video/bt8xx/bttv-input.c
+++ b/drivers/media/video/bt8xx/bttv-input.c
@@ -49,7 +49,7 @@ module_param(ir_rc5_remote_gap, int, 0644);
static void ir_handle_key(struct bttv *btv)
{
- struct card_ir *ir = btv->remote;
+ struct bttv_ir *ir = btv->remote;
u32 gpio,data;
/* read gpio value */
@@ -83,7 +83,7 @@ static void ir_handle_key(struct bttv *btv)
static void ir_enltv_handle_key(struct bttv *btv)
{
- struct card_ir *ir = btv->remote;
+ struct bttv_ir *ir = btv->remote;
u32 gpio, data, keyup;
/* read gpio value */
@@ -122,7 +122,7 @@ static void ir_enltv_handle_key(struct bttv *btv)
void bttv_input_irq(struct bttv *btv)
{
- struct card_ir *ir = btv->remote;
+ struct bttv_ir *ir = btv->remote;
if (!ir->polling)
ir_handle_key(btv);
@@ -131,7 +131,7 @@ void bttv_input_irq(struct bttv *btv)
static void bttv_input_timer(unsigned long data)
{
struct bttv *btv = (struct bttv*)data;
- struct card_ir *ir = btv->remote;
+ struct bttv_ir *ir = btv->remote;
if (btv->c.type == BTTV_BOARD_ENLTV_FM_2)
ir_enltv_handle_key(btv);
@@ -185,9 +185,9 @@ static u32 bttv_rc5_decode(unsigned int code)
return rc5;
}
-void bttv_rc5_timer_end(unsigned long data)
+static void bttv_rc5_timer_end(unsigned long data)
{
- struct card_ir *ir = (struct card_ir *)data;
+ struct bttv_ir *ir = (struct card_ir *)data;
struct timeval tv;
unsigned long current_jiffies;
u32 gap;
@@ -206,7 +206,7 @@ void bttv_rc5_timer_end(unsigned long data)
}
/* signal we're ready to start a new code */
- ir->active = 0;
+ ir->active = false;
/* Allow some timer jitter (RC5 is ~24ms anyway so this is ok) */
if (gap < 28000) {
@@ -242,7 +242,7 @@ void bttv_rc5_timer_end(unsigned long data)
static int bttv_rc5_irq(struct bttv *btv)
{
- struct card_ir *ir = btv->remote;
+ struct bttv_ir *ir = btv->remote;
struct timeval tv;
u32 gpio;
u32 gap;
@@ -278,7 +278,7 @@ static int bttv_rc5_irq(struct bttv *btv)
}
/* starting new code */
} else {
- ir->active = 1;
+ ir->active = true;
ir->code = 0;
ir->base_time = tv;
ir->last_bit = 0;
@@ -295,7 +295,7 @@ static int bttv_rc5_irq(struct bttv *btv)
/* ---------------------------------------------------------------------- */
-static void bttv_ir_start(struct bttv *btv, struct card_ir *ir)
+static void bttv_ir_start(struct bttv *btv, struct bttv_ir *ir)
{
if (ir->polling) {
setup_timer(&ir->timer, bttv_input_timer, (unsigned long)btv);
@@ -303,9 +303,8 @@ static void bttv_ir_start(struct bttv *btv, struct card_ir *ir)
add_timer(&ir->timer);
} else if (ir->rc5_gpio) {
/* set timer_end for code completion */
- init_timer(&ir->timer_end);
- ir->timer_end.function = bttv_rc5_timer_end;
- ir->timer_end.data = (unsigned long)ir;
+ setup_timer(&ir->timer_end, bttv_rc5_timer_end,
+ (unsigned long)ir);
ir->shift_by = 1;
ir->start = 3;
ir->addr = 0x0;
@@ -409,7 +408,7 @@ int __devexit fini_bttv_i2c(struct bttv *btv)
int bttv_input_init(struct bttv *btv)
{
- struct card_ir *ir;
+ struct bttv_ir *ir;
char *ir_codes = NULL;
struct rc_dev *rc;
int err = -ENOMEM;
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h
index b71d04d..3d5b2bc 100644
--- a/drivers/media/video/bt8xx/bttvp.h
+++ b/drivers/media/video/bt8xx/bttvp.h
@@ -120,15 +120,12 @@ struct bttv_format {
int hshift,vshift; /* for planar modes */
};
-struct card_ir {
+struct bttv_ir {
struct rc_dev *dev;
char name[32];
char phys[32];
-#if 0
- int users;
- u32 running:1;
-#endif
+
/* Usual gpio signalling */
u32 mask_keycode;
u32 mask_keydown;
@@ -139,25 +136,15 @@ struct card_ir {
int start; // What should RC5_START() be
int addr; // What RC5_ADDR() should be.
int rc5_remote_gap;
- struct work_struct work;
struct timer_list timer;
/* RC5 gpio */
- u32 rc5_gpio;
- struct timer_list timer_end; /* timer_end for code completion */
- u32 last_bit; /* last raw bit seen */
- u32 code; /* raw code under construction */
- struct timeval base_time; /* time of last seen code */
- int active; /* building raw code */
-
-#if 0
- /* NEC decoding */
- u32 nec_gpio;
- struct tasklet_struct tlet;
-
- /* IR core raw decoding */
- u32 raw_decode;
-#endif
+ u32 rc5_gpio;
+ struct timer_list timer_end; /* timer_end for code completion */
+ u32 last_bit; /* last raw bit seen */
+ u32 code; /* raw code under construction */
+ struct timeval base_time; /* time of last seen code */
+ bool active; /* building raw code */
};
@@ -408,7 +395,7 @@ struct bttv {
/* infrared remote */
int has_remote;
- struct card_ir *remote;
+ struct bttv_ir *remote;
/* I2C remote data */
struct IR_i2c_init_data init_data;
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 08/10] bttv: merge ir decoding timers
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
` (6 preceding siblings ...)
2010-11-19 23:43 ` [PATCH 07/10] bttv: rename struct card_ir to bttv_ir David Härdeman
@ 2010-11-19 23:43 ` David Härdeman
2010-11-19 23:43 ` [PATCH 09/10] mceusb: int to bool conversion David Härdeman
2010-11-19 23:43 ` [PATCH 10/10] rc-core: fix some leftovers from the renaming patches David Härdeman
9 siblings, 0 replies; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:43 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
Similarly to saa7134, bttv_ir has two timers, only one of which is used
at a time and which serve the same purpose. Merge them.
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/video/bt8xx/bttv-input.c | 8 +++-----
drivers/media/video/bt8xx/bttvp.h | 3 +--
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c
index c8bf423..8013d91 100644
--- a/drivers/media/video/bt8xx/bttv-input.c
+++ b/drivers/media/video/bt8xx/bttv-input.c
@@ -283,8 +283,7 @@ static int bttv_rc5_irq(struct bttv *btv)
ir->base_time = tv;
ir->last_bit = 0;
- mod_timer(&ir->timer_end,
- current_jiffies + msecs_to_jiffies(30));
+ mod_timer(&ir->timer, current_jiffies + msecs_to_jiffies(30));
}
/* toggle GPIO pin 4 to reset the irq */
@@ -303,8 +302,7 @@ static void bttv_ir_start(struct bttv *btv, struct bttv_ir *ir)
add_timer(&ir->timer);
} else if (ir->rc5_gpio) {
/* set timer_end for code completion */
- setup_timer(&ir->timer_end, bttv_rc5_timer_end,
- (unsigned long)ir);
+ setup_timer(&ir->timer, bttv_rc5_timer_end, (unsigned long)ir);
ir->shift_by = 1;
ir->start = 3;
ir->addr = 0x0;
@@ -322,7 +320,7 @@ static void bttv_ir_stop(struct bttv *btv)
if (btv->remote->rc5_gpio) {
u32 gpio;
- del_timer_sync(&btv->remote->timer_end);
+ del_timer_sync(&btv->remote->timer);
flush_scheduled_work();
gpio = bttv_gpio_read(&btv->c);
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h
index 3d5b2bc..0712320 100644
--- a/drivers/media/video/bt8xx/bttvp.h
+++ b/drivers/media/video/bt8xx/bttvp.h
@@ -122,6 +122,7 @@ struct bttv_format {
struct bttv_ir {
struct rc_dev *dev;
+ struct timer_list timer;
char name[32];
char phys[32];
@@ -136,11 +137,9 @@ struct bttv_ir {
int start; // What should RC5_START() be
int addr; // What RC5_ADDR() should be.
int rc5_remote_gap;
- struct timer_list timer;
/* RC5 gpio */
u32 rc5_gpio;
- struct timer_list timer_end; /* timer_end for code completion */
u32 last_bit; /* last raw bit seen */
u32 code; /* raw code under construction */
struct timeval base_time; /* time of last seen code */
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 09/10] mceusb: int to bool conversion
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
` (7 preceding siblings ...)
2010-11-19 23:43 ` [PATCH 08/10] bttv: merge ir decoding timers David Härdeman
@ 2010-11-19 23:43 ` David Härdeman
2010-11-19 23:43 ` [PATCH 10/10] rc-core: fix some leftovers from the renaming patches David Härdeman
9 siblings, 0 replies; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:43 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
Convert boolean variables to use the corresponding data type.
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/rc/mceusb.c | 62 +++++++++++++++++++--------------------------
1 files changed, 26 insertions(+), 36 deletions(-)
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index ef9bddc..bb6e2dc 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -103,9 +103,9 @@
/* module parameters */
#ifdef CONFIG_USB_DEBUG
-static int debug = 1;
+static bool debug = true;
#else
-static int debug;
+static bool debug;
#endif
/* general constants */
@@ -151,12 +151,12 @@ enum mceusb_model_type {
};
struct mceusb_model {
- u32 mce_gen1:1;
- u32 mce_gen2:1;
- u32 mce_gen3:1;
- u32 tx_mask_inverted:1;
- u32 is_polaris:1;
- u32 no_tx:1;
+ bool mce_gen1:1;
+ bool mce_gen2:1;
+ bool mce_gen3:1;
+ bool tx_mask_inverted:1;
+ bool is_polaris:1;
+ bool no_tx:1;
const char *rc_map; /* Allow specify a per-board map */
const char *name; /* per-board name */
@@ -164,22 +164,22 @@ struct mceusb_model {
static const struct mceusb_model mceusb_model[] = {
[MCE_GEN1] = {
- .mce_gen1 = 1,
- .tx_mask_inverted = 1,
+ .mce_gen1 = true,
+ .tx_mask_inverted = true,
},
[MCE_GEN2] = {
- .mce_gen2 = 1,
+ .mce_gen2 = true,
},
[MCE_GEN2_TX_INV] = {
- .mce_gen2 = 1,
- .tx_mask_inverted = 1,
+ .mce_gen2 = true,
+ .tx_mask_inverted = true,
},
[MCE_GEN3] = {
- .mce_gen3 = 1,
- .tx_mask_inverted = 1,
+ .mce_gen3 = true,
+ .tx_mask_inverted = true,
},
[POLARIS_EVK] = {
- .is_polaris = 1,
+ .is_polaris = true,
/*
* In fact, the EVK is shipped without
* remotes, but we should have something handy,
@@ -189,8 +189,8 @@ static const struct mceusb_model mceusb_model[] = {
.name = "Conexant Hybrid TV (cx231xx) MCE IR",
},
[CX_HYBRID_TV] = {
- .is_polaris = 1,
- .no_tx = 1, /* tx isn't wired up at all */
+ .is_polaris = true,
+ .no_tx = true, /* tx isn't wired up at all */
.name = "Conexant Hybrid TV (cx231xx) MCE IR",
},
};
@@ -344,10 +344,10 @@ struct mceusb_dev {
u8 cmd, rem; /* Remaining IR data bytes in packet */
struct {
- u32 connected:1;
- u32 tx_mask_inverted:1;
- u32 microsoft_gen1:1;
- u32 no_tx:1;
+ bool connected:1;
+ bool tx_mask_inverted:1;
+ bool microsoft_gen1:1;
+ bool no_tx:1;
} flags;
/* transmit support */
@@ -1090,21 +1090,11 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
int pipe, maxp, i;
char buf[63], name[128] = "";
enum mceusb_model_type model = id->driver_info;
- bool is_gen3;
- bool is_microsoft_gen1;
- bool tx_mask_inverted;
- bool is_polaris;
dev_dbg(&intf->dev, "%s called\n", __func__);
-
idesc = intf->cur_altsetting;
- is_gen3 = mceusb_model[model].mce_gen3;
- is_microsoft_gen1 = mceusb_model[model].mce_gen1;
- tx_mask_inverted = mceusb_model[model].tx_mask_inverted;
- is_polaris = mceusb_model[model].is_polaris;
-
- if (is_polaris) {
+ if (mceusb_model[model].is_polaris) {
/* Interface 0 is IR */
if (idesc->desc.bInterfaceNumber)
return -ENODEV;
@@ -1167,8 +1157,8 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
ir->usbdev = dev;
ir->dev = &intf->dev;
ir->len_in = maxp;
- ir->flags.microsoft_gen1 = is_microsoft_gen1;
- ir->flags.tx_mask_inverted = tx_mask_inverted;
+ ir->flags.microsoft_gen1 = mceusb_model[model].mce_gen1;
+ ir->flags.tx_mask_inverted = mceusb_model[model].tx_mask_inverted;
ir->flags.no_tx = mceusb_model[model].no_tx;
ir->model = model;
@@ -1203,7 +1193,7 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
/* initialize device */
if (ir->flags.microsoft_gen1)
mceusb_gen1_init(ir);
- else if (!is_gen3)
+ else if (!mceusb_model[model].mce_gen3)
mceusb_gen2_init(ir);
mceusb_get_parameters(ir);
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 10/10] rc-core: fix some leftovers from the renaming patches
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
` (8 preceding siblings ...)
2010-11-19 23:43 ` [PATCH 09/10] mceusb: int to bool conversion David Härdeman
@ 2010-11-19 23:43 ` David Härdeman
9 siblings, 0 replies; 12+ messages in thread
From: David Härdeman @ 2010-11-19 23:43 UTC (permalink / raw)
To: linux-media; +Cc: jarod, mchehab
Fix some minor comments etc which are leftover from the old naming scheme.
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/rc/ir-raw.c | 2 +-
drivers/media/rc/rc-core-priv.h | 6 +++---
drivers/media/rc/rc-main.c | 2 +-
include/media/rc-core.h | 12 ++++++------
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/media/rc/ir-raw.c b/drivers/media/rc/ir-raw.c
index 165412f..185badd 100644
--- a/drivers/media/rc/ir-raw.c
+++ b/drivers/media/rc/ir-raw.c
@@ -1,4 +1,4 @@
-/* ir-raw-event.c - handle IR Pulse/Space event
+/* ir-raw.c - handle IR pulse/space events
*
* Copyright (C) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
diff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h
index 48065b7..873b387 100644
--- a/drivers/media/rc/rc-core-priv.h
+++ b/drivers/media/rc/rc-core-priv.h
@@ -13,8 +13,8 @@
* GNU General Public License for more details.
*/
-#ifndef _IR_RAW_EVENT
-#define _IR_RAW_EVENT
+#ifndef _RC_CORE_PRIV
+#define _RC_CORE_PRIV
#include <linux/slab.h>
#include <linux/spinlock.h>
@@ -190,4 +190,4 @@ void ir_raw_init(void);
#endif
-#endif /* _IR_RAW_EVENT */
+#endif /* _RC_CORE_PRIV */
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 0b0524c..6bdd0d3 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1,4 +1,4 @@
-/* rc-core.c - handle IR scancode->keycode tables
+/* rc-main.c - Remote Controller core module
*
* Copyright (C) 2009-2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index affb93f..a23c1fc 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -206,12 +206,12 @@ static inline 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;
+ if (mask & 1) {
+ if (data & 1)
+ value |= vbit;
+ vbit <<= 1;
+ }
+ data >>= 1;
} while (mask >>= 1);
return value;
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 06/10] saa7134: make module parameters boolean
2010-11-19 23:43 ` [PATCH 06/10] saa7134: make module parameters boolean David Härdeman
@ 2010-11-20 6:10 ` hermann pitton
0 siblings, 0 replies; 12+ messages in thread
From: hermann pitton @ 2010-11-20 6:10 UTC (permalink / raw)
To: David Härdeman; +Cc: linux-media, jarod, mchehab
Am Samstag, den 20.11.2010, 00:43 +0100 schrieb David Härdeman:
> int to bool conversion for module parameters which are truely boolean.
>
> Signed-off-by: David Härdeman <david@hardeman.nu>
> ---
> drivers/media/video/saa7134/saa7134-input.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
> index 8b80efb..aea74e2 100644
> --- a/drivers/media/video/saa7134/saa7134-input.c
> +++ b/drivers/media/video/saa7134/saa7134-input.c
> @@ -29,12 +29,12 @@
>
> #define MODULE_NAME "saa7134"
>
> -static unsigned int disable_ir;
> -module_param(disable_ir, int, 0444);
> +static bool disable_ir;
> +module_param(disable_ir, bool, 0444);
> MODULE_PARM_DESC(disable_ir,"disable infrared remote support");
>
> -static unsigned int ir_debug;
> -module_param(ir_debug, int, 0644);
> +static bool ir_debug;
> +module_param(ir_debug, bool, 0644);
> MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]");
>
> static int pinnacle_remote;
>
Hi,
not exactly that one, but given all the previous changes,
I wonder if there will ever be some "tested-by:" from someone ...
Cheers,
Hermann
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-11-20 6:13 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19 23:42 [PATCH 00/10] rc-core: various cleanups David Härdeman
2010-11-19 23:42 ` [PATCH 01/10] saa7134: remove unused module parameter David Härdeman
2010-11-19 23:42 ` [PATCH 02/10] saa7134: use full keycode for BeholdTV David Härdeman
2010-11-19 23:42 ` [PATCH 03/10] saa7134: some minor cleanups David Härdeman
2010-11-19 23:42 ` [PATCH 04/10] saa7134: merge saa7134_card_ir->timer and saa7134_card_ir->timer_end David Härdeman
2010-11-19 23:43 ` [PATCH 05/10] saa7134: protect the ir user count David Härdeman
2010-11-19 23:43 ` [PATCH 06/10] saa7134: make module parameters boolean David Härdeman
2010-11-20 6:10 ` hermann pitton
2010-11-19 23:43 ` [PATCH 07/10] bttv: rename struct card_ir to bttv_ir David Härdeman
2010-11-19 23:43 ` [PATCH 08/10] bttv: merge ir decoding timers David Härdeman
2010-11-19 23:43 ` [PATCH 09/10] mceusb: int to bool conversion David Härdeman
2010-11-19 23:43 ` [PATCH 10/10] rc-core: fix some leftovers from the renaming patches David Härdeman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox