diff options
-rw-r--r-- | drivers/media/dvb/ttpci/budget-av.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-ci.c | 5 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-core.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-patch.c | 7 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget.c | 5 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget.h | 2 |
6 files changed, 21 insertions, 10 deletions
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c index 839c94101b4e..1032ea77837e 100644 --- a/drivers/media/dvb/ttpci/budget-av.c +++ b/drivers/media/dvb/ttpci/budget-av.c | |||
@@ -57,6 +57,8 @@ | |||
57 | #define SLOTSTATUS_READY 8 | 57 | #define SLOTSTATUS_READY 8 |
58 | #define SLOTSTATUS_OCCUPIED (SLOTSTATUS_PRESENT|SLOTSTATUS_RESET|SLOTSTATUS_READY) | 58 | #define SLOTSTATUS_OCCUPIED (SLOTSTATUS_PRESENT|SLOTSTATUS_RESET|SLOTSTATUS_READY) |
59 | 59 | ||
60 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
61 | |||
60 | struct budget_av { | 62 | struct budget_av { |
61 | struct budget budget; | 63 | struct budget budget; |
62 | struct video_device *vd; | 64 | struct video_device *vd; |
@@ -1127,7 +1129,9 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio | |||
1127 | 1129 | ||
1128 | dev->ext_priv = budget_av; | 1130 | dev->ext_priv = budget_av; |
1129 | 1131 | ||
1130 | if ((err = ttpci_budget_init(&budget_av->budget, dev, info, THIS_MODULE))) { | 1132 | err = ttpci_budget_init(&budget_av->budget, dev, info, THIS_MODULE, |
1133 | adapter_nr); | ||
1134 | if (err) { | ||
1131 | kfree(budget_av); | 1135 | kfree(budget_av); |
1132 | return err; | 1136 | return err; |
1133 | } | 1137 | } |
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index 38dd5cf1aed2..0a5aad45435d 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c | |||
@@ -92,6 +92,8 @@ static int ir_debug; | |||
92 | module_param(ir_debug, int, 0644); | 92 | module_param(ir_debug, int, 0644); |
93 | MODULE_PARM_DESC(ir_debug, "enable debugging information for IR decoding"); | 93 | MODULE_PARM_DESC(ir_debug, "enable debugging information for IR decoding"); |
94 | 94 | ||
95 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
96 | |||
95 | struct budget_ci_ir { | 97 | struct budget_ci_ir { |
96 | struct input_dev *dev; | 98 | struct input_dev *dev; |
97 | struct tasklet_struct msp430_irq_tasklet; | 99 | struct tasklet_struct msp430_irq_tasklet; |
@@ -1183,7 +1185,8 @@ static int budget_ci_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio | |||
1183 | 1185 | ||
1184 | dev->ext_priv = budget_ci; | 1186 | dev->ext_priv = budget_ci; |
1185 | 1187 | ||
1186 | err = ttpci_budget_init(&budget_ci->budget, dev, info, THIS_MODULE); | 1188 | err = ttpci_budget_init(&budget_ci->budget, dev, info, THIS_MODULE, |
1189 | adapter_nr); | ||
1187 | if (err) | 1190 | if (err) |
1188 | goto out2; | 1191 | goto out2; |
1189 | 1192 | ||
diff --git a/drivers/media/dvb/ttpci/budget-core.c b/drivers/media/dvb/ttpci/budget-core.c index 6f4ddb643fee..ba18e56d5f11 100644 --- a/drivers/media/dvb/ttpci/budget-core.c +++ b/drivers/media/dvb/ttpci/budget-core.c | |||
@@ -57,8 +57,6 @@ module_param_named(bufsize, dma_buffer_size, int, 0444); | |||
57 | MODULE_PARM_DESC(debug, "Turn on/off budget debugging (default:off)."); | 57 | MODULE_PARM_DESC(debug, "Turn on/off budget debugging (default:off)."); |
58 | MODULE_PARM_DESC(bufsize, "DMA buffer size in KB, default: 188, min: 188, max: 1410 (Activy: 564)"); | 58 | MODULE_PARM_DESC(bufsize, "DMA buffer size in KB, default: 188, min: 188, max: 1410 (Activy: 564)"); |
59 | 59 | ||
60 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
61 | |||
62 | /**************************************************************************** | 60 | /**************************************************************************** |
63 | * TT budget / WinTV Nova | 61 | * TT budget / WinTV Nova |
64 | ****************************************************************************/ | 62 | ****************************************************************************/ |
@@ -411,7 +409,7 @@ static void budget_unregister(struct budget *budget) | |||
411 | 409 | ||
412 | int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, | 410 | int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, |
413 | struct saa7146_pci_extension_data *info, | 411 | struct saa7146_pci_extension_data *info, |
414 | struct module *owner) | 412 | struct module *owner, short *adapter_nums) |
415 | { | 413 | { |
416 | int ret = 0; | 414 | int ret = 0; |
417 | struct budget_info *bi = info->ext_priv; | 415 | struct budget_info *bi = info->ext_priv; |
@@ -474,7 +472,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, | |||
474 | printk("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size); | 472 | printk("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size); |
475 | 473 | ||
476 | ret = dvb_register_adapter(&budget->dvb_adapter, budget->card->name, | 474 | ret = dvb_register_adapter(&budget->dvb_adapter, budget->card->name, |
477 | owner, &budget->dev->pci->dev, adapter_nr); | 475 | owner, &budget->dev->pci->dev, adapter_nums); |
478 | if (ret < 0) | 476 | if (ret < 0) |
479 | return ret; | 477 | return ret; |
480 | 478 | ||
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index bbd234fe11c1..60136688a9a4 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c | |||
@@ -39,6 +39,8 @@ | |||
39 | 39 | ||
40 | #include "bsru6.h" | 40 | #include "bsru6.h" |
41 | 41 | ||
42 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
43 | |||
42 | #define budget_patch budget | 44 | #define budget_patch budget |
43 | 45 | ||
44 | static struct saa7146_extension budget_extension; | 46 | static struct saa7146_extension budget_extension; |
@@ -592,8 +594,9 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte | |||
592 | 594 | ||
593 | dprintk(2, "budget: %p\n", budget); | 595 | dprintk(2, "budget: %p\n", budget); |
594 | 596 | ||
595 | if ((err = ttpci_budget_init (budget, dev, info, THIS_MODULE))) { | 597 | err = ttpci_budget_init(budget, dev, info, THIS_MODULE, adapter_nr); |
596 | kfree (budget); | 598 | if (err) { |
599 | kfree(budget); | ||
597 | return err; | 600 | return err; |
598 | } | 601 | } |
599 | 602 | ||
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index d95203d55403..1638e1d9f538 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -52,6 +52,8 @@ static int diseqc_method; | |||
52 | module_param(diseqc_method, int, 0444); | 52 | module_param(diseqc_method, int, 0444); |
53 | MODULE_PARM_DESC(diseqc_method, "Select DiSEqC method for subsystem id 13c2:1003, 0: default, 1: more reliable (for newer revisions only)"); | 53 | MODULE_PARM_DESC(diseqc_method, "Select DiSEqC method for subsystem id 13c2:1003, 0: default, 1: more reliable (for newer revisions only)"); |
54 | 54 | ||
55 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
56 | |||
55 | static void Set22K (struct budget *budget, int state) | 57 | static void Set22K (struct budget *budget, int state) |
56 | { | 58 | { |
57 | struct saa7146_dev *dev=budget->dev; | 59 | struct saa7146_dev *dev=budget->dev; |
@@ -598,7 +600,8 @@ static int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_ | |||
598 | 600 | ||
599 | dev->ext_priv = budget; | 601 | dev->ext_priv = budget; |
600 | 602 | ||
601 | if ((err = ttpci_budget_init (budget, dev, info, THIS_MODULE))) { | 603 | err = ttpci_budget_init(budget, dev, info, THIS_MODULE, adapter_nr); |
604 | if (err) { | ||
602 | printk("==> failed\n"); | 605 | printk("==> failed\n"); |
603 | kfree (budget); | 606 | kfree (budget); |
604 | return err; | 607 | return err; |
diff --git a/drivers/media/dvb/ttpci/budget.h b/drivers/media/dvb/ttpci/budget.h index dd450b739bff..86435bf16260 100644 --- a/drivers/media/dvb/ttpci/budget.h +++ b/drivers/media/dvb/ttpci/budget.h | |||
@@ -109,7 +109,7 @@ static struct saa7146_pci_extension_data x_var = { \ | |||
109 | 109 | ||
110 | extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, | 110 | extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, |
111 | struct saa7146_pci_extension_data *info, | 111 | struct saa7146_pci_extension_data *info, |
112 | struct module *owner); | 112 | struct module *owner, short *adapter_nums); |
113 | extern void ttpci_budget_init_hooks(struct budget *budget); | 113 | extern void ttpci_budget_init_hooks(struct budget *budget); |
114 | extern int ttpci_budget_deinit(struct budget *budget); | 114 | extern int ttpci_budget_deinit(struct budget *budget); |
115 | extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr); | 115 | extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr); |