diff options
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/Kconfig | 60 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/Makefile | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/dvb-pll.c | 24 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/nxt200x.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/or51211.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/sp8870.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/sp887x.c | 2 |
7 files changed, 57 insertions, 39 deletions
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig index 0ef361f0309b..db978555b1eb 100644 --- a/drivers/media/dvb/frontends/Kconfig +++ b/drivers/media/dvb/frontends/Kconfig | |||
@@ -6,43 +6,43 @@ comment "DVB-S (satellite) frontends" | |||
6 | 6 | ||
7 | config DVB_STV0299 | 7 | config DVB_STV0299 |
8 | tristate "ST STV0299 based" | 8 | tristate "ST STV0299 based" |
9 | depends on DVB_CORE | 9 | depends on DVB_CORE && I2C |
10 | help | 10 | help |
11 | A DVB-S tuner module. Say Y when you want to support this frontend. | 11 | A DVB-S tuner module. Say Y when you want to support this frontend. |
12 | 12 | ||
13 | config DVB_CX24110 | 13 | config DVB_CX24110 |
14 | tristate "Conexant CX24110 based" | 14 | tristate "Conexant CX24110 based" |
15 | depends on DVB_CORE | 15 | depends on DVB_CORE && I2C |
16 | help | 16 | help |
17 | A DVB-S tuner module. Say Y when you want to support this frontend. | 17 | A DVB-S tuner module. Say Y when you want to support this frontend. |
18 | 18 | ||
19 | config DVB_CX24123 | 19 | config DVB_CX24123 |
20 | tristate "Conexant CX24123 based" | 20 | tristate "Conexant CX24123 based" |
21 | depends on DVB_CORE | 21 | depends on DVB_CORE && I2C |
22 | help | 22 | help |
23 | A DVB-S tuner module. Say Y when you want to support this frontend. | 23 | A DVB-S tuner module. Say Y when you want to support this frontend. |
24 | 24 | ||
25 | config DVB_TDA8083 | 25 | config DVB_TDA8083 |
26 | tristate "Philips TDA8083 based" | 26 | tristate "Philips TDA8083 based" |
27 | depends on DVB_CORE | 27 | depends on DVB_CORE && I2C |
28 | help | 28 | help |
29 | A DVB-S tuner module. Say Y when you want to support this frontend. | 29 | A DVB-S tuner module. Say Y when you want to support this frontend. |
30 | 30 | ||
31 | config DVB_MT312 | 31 | config DVB_MT312 |
32 | tristate "Zarlink VP310/MT312 based" | 32 | tristate "Zarlink VP310/MT312 based" |
33 | depends on DVB_CORE | 33 | depends on DVB_CORE && I2C |
34 | help | 34 | help |
35 | A DVB-S tuner module. Say Y when you want to support this frontend. | 35 | A DVB-S tuner module. Say Y when you want to support this frontend. |
36 | 36 | ||
37 | config DVB_VES1X93 | 37 | config DVB_VES1X93 |
38 | tristate "VLSI VES1893 or VES1993 based" | 38 | tristate "VLSI VES1893 or VES1993 based" |
39 | depends on DVB_CORE | 39 | depends on DVB_CORE && I2C |
40 | help | 40 | help |
41 | A DVB-S tuner module. Say Y when you want to support this frontend. | 41 | A DVB-S tuner module. Say Y when you want to support this frontend. |
42 | 42 | ||
43 | config DVB_S5H1420 | 43 | config DVB_S5H1420 |
44 | tristate "Samsung S5H1420 based" | 44 | tristate "Samsung S5H1420 based" |
45 | depends on DVB_CORE | 45 | depends on DVB_CORE && I2C |
46 | help | 46 | help |
47 | A DVB-S tuner module. Say Y when you want to support this frontend. | 47 | A DVB-S tuner module. Say Y when you want to support this frontend. |
48 | 48 | ||
@@ -51,7 +51,7 @@ comment "DVB-T (terrestrial) frontends" | |||
51 | 51 | ||
52 | config DVB_SP8870 | 52 | config DVB_SP8870 |
53 | tristate "Spase sp8870 based" | 53 | tristate "Spase sp8870 based" |
54 | depends on DVB_CORE | 54 | depends on DVB_CORE && I2C |
55 | select FW_LOADER | 55 | select FW_LOADER |
56 | help | 56 | help |
57 | A DVB-T tuner module. Say Y when you want to support this frontend. | 57 | A DVB-T tuner module. Say Y when you want to support this frontend. |
@@ -63,7 +63,7 @@ config DVB_SP8870 | |||
63 | 63 | ||
64 | config DVB_SP887X | 64 | config DVB_SP887X |
65 | tristate "Spase sp887x based" | 65 | tristate "Spase sp887x based" |
66 | depends on DVB_CORE | 66 | depends on DVB_CORE && I2C |
67 | select FW_LOADER | 67 | select FW_LOADER |
68 | help | 68 | help |
69 | A DVB-T tuner module. Say Y when you want to support this frontend. | 69 | A DVB-T tuner module. Say Y when you want to support this frontend. |
@@ -75,25 +75,25 @@ config DVB_SP887X | |||
75 | 75 | ||
76 | config DVB_CX22700 | 76 | config DVB_CX22700 |
77 | tristate "Conexant CX22700 based" | 77 | tristate "Conexant CX22700 based" |
78 | depends on DVB_CORE | 78 | depends on DVB_CORE && I2C |
79 | help | 79 | help |
80 | A DVB-T tuner module. Say Y when you want to support this frontend. | 80 | A DVB-T tuner module. Say Y when you want to support this frontend. |
81 | 81 | ||
82 | config DVB_CX22702 | 82 | config DVB_CX22702 |
83 | tristate "Conexant cx22702 demodulator (OFDM)" | 83 | tristate "Conexant cx22702 demodulator (OFDM)" |
84 | depends on DVB_CORE | 84 | depends on DVB_CORE && I2C |
85 | help | 85 | help |
86 | A DVB-T tuner module. Say Y when you want to support this frontend. | 86 | A DVB-T tuner module. Say Y when you want to support this frontend. |
87 | 87 | ||
88 | config DVB_L64781 | 88 | config DVB_L64781 |
89 | tristate "LSI L64781" | 89 | tristate "LSI L64781" |
90 | depends on DVB_CORE | 90 | depends on DVB_CORE && I2C |
91 | help | 91 | help |
92 | A DVB-T tuner module. Say Y when you want to support this frontend. | 92 | A DVB-T tuner module. Say Y when you want to support this frontend. |
93 | 93 | ||
94 | config DVB_TDA1004X | 94 | config DVB_TDA1004X |
95 | tristate "Philips TDA10045H/TDA10046H based" | 95 | tristate "Philips TDA10045H/TDA10046H based" |
96 | depends on DVB_CORE | 96 | depends on DVB_CORE && I2C |
97 | select FW_LOADER | 97 | select FW_LOADER |
98 | help | 98 | help |
99 | A DVB-T tuner module. Say Y when you want to support this frontend. | 99 | A DVB-T tuner module. Say Y when you want to support this frontend. |
@@ -106,32 +106,32 @@ config DVB_TDA1004X | |||
106 | 106 | ||
107 | config DVB_NXT6000 | 107 | config DVB_NXT6000 |
108 | tristate "NxtWave Communications NXT6000 based" | 108 | tristate "NxtWave Communications NXT6000 based" |
109 | depends on DVB_CORE | 109 | depends on DVB_CORE && I2C |
110 | help | 110 | help |
111 | A DVB-T tuner module. Say Y when you want to support this frontend. | 111 | A DVB-T tuner module. Say Y when you want to support this frontend. |
112 | 112 | ||
113 | config DVB_MT352 | 113 | config DVB_MT352 |
114 | tristate "Zarlink MT352 based" | 114 | tristate "Zarlink MT352 based" |
115 | depends on DVB_CORE | 115 | depends on DVB_CORE && I2C |
116 | help | 116 | help |
117 | A DVB-T tuner module. Say Y when you want to support this frontend. | 117 | A DVB-T tuner module. Say Y when you want to support this frontend. |
118 | 118 | ||
119 | config DVB_ZL10353 | 119 | config DVB_ZL10353 |
120 | tristate "Zarlink ZL10353 based" | 120 | tristate "Zarlink ZL10353 based" |
121 | depends on DVB_CORE | 121 | depends on DVB_CORE && I2C |
122 | help | 122 | help |
123 | A DVB-T tuner module. Say Y when you want to support this frontend. | 123 | A DVB-T tuner module. Say Y when you want to support this frontend. |
124 | 124 | ||
125 | config DVB_DIB3000MB | 125 | config DVB_DIB3000MB |
126 | tristate "DiBcom 3000M-B" | 126 | tristate "DiBcom 3000M-B" |
127 | depends on DVB_CORE | 127 | depends on DVB_CORE && I2C |
128 | help | 128 | help |
129 | A DVB-T tuner module. Designed for mobile usage. Say Y when you want | 129 | A DVB-T tuner module. Designed for mobile usage. Say Y when you want |
130 | to support this frontend. | 130 | to support this frontend. |
131 | 131 | ||
132 | config DVB_DIB3000MC | 132 | config DVB_DIB3000MC |
133 | tristate "DiBcom 3000P/M-C" | 133 | tristate "DiBcom 3000P/M-C" |
134 | depends on DVB_CORE | 134 | depends on DVB_CORE && I2C |
135 | help | 135 | help |
136 | A DVB-T tuner module. Designed for mobile usage. Say Y when you want | 136 | A DVB-T tuner module. Designed for mobile usage. Say Y when you want |
137 | to support this frontend. | 137 | to support this frontend. |
@@ -141,19 +141,19 @@ comment "DVB-C (cable) frontends" | |||
141 | 141 | ||
142 | config DVB_VES1820 | 142 | config DVB_VES1820 |
143 | tristate "VLSI VES1820 based" | 143 | tristate "VLSI VES1820 based" |
144 | depends on DVB_CORE | 144 | depends on DVB_CORE && I2C |
145 | help | 145 | help |
146 | A DVB-C tuner module. Say Y when you want to support this frontend. | 146 | A DVB-C tuner module. Say Y when you want to support this frontend. |
147 | 147 | ||
148 | config DVB_TDA10021 | 148 | config DVB_TDA10021 |
149 | tristate "Philips TDA10021 based" | 149 | tristate "Philips TDA10021 based" |
150 | depends on DVB_CORE | 150 | depends on DVB_CORE && I2C |
151 | help | 151 | help |
152 | A DVB-C tuner module. Say Y when you want to support this frontend. | 152 | A DVB-C tuner module. Say Y when you want to support this frontend. |
153 | 153 | ||
154 | config DVB_STV0297 | 154 | config DVB_STV0297 |
155 | tristate "ST STV0297 based" | 155 | tristate "ST STV0297 based" |
156 | depends on DVB_CORE | 156 | depends on DVB_CORE && I2C |
157 | help | 157 | help |
158 | A DVB-C tuner module. Say Y when you want to support this frontend. | 158 | A DVB-C tuner module. Say Y when you want to support this frontend. |
159 | 159 | ||
@@ -162,7 +162,7 @@ comment "ATSC (North American/Korean Terrestrial/Cable DTV) frontends" | |||
162 | 162 | ||
163 | config DVB_NXT200X | 163 | config DVB_NXT200X |
164 | tristate "NxtWave Communications NXT2002/NXT2004 based" | 164 | tristate "NxtWave Communications NXT2002/NXT2004 based" |
165 | depends on DVB_CORE | 165 | depends on DVB_CORE && I2C |
166 | select FW_LOADER | 166 | select FW_LOADER |
167 | help | 167 | help |
168 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want | 168 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want |
@@ -176,7 +176,7 @@ config DVB_NXT200X | |||
176 | 176 | ||
177 | config DVB_OR51211 | 177 | config DVB_OR51211 |
178 | tristate "Oren OR51211 based" | 178 | tristate "Oren OR51211 based" |
179 | depends on DVB_CORE | 179 | depends on DVB_CORE && I2C |
180 | select FW_LOADER | 180 | select FW_LOADER |
181 | help | 181 | help |
182 | An ATSC 8VSB tuner module. Say Y when you want to support this frontend. | 182 | An ATSC 8VSB tuner module. Say Y when you want to support this frontend. |
@@ -188,7 +188,7 @@ config DVB_OR51211 | |||
188 | 188 | ||
189 | config DVB_OR51132 | 189 | config DVB_OR51132 |
190 | tristate "Oren OR51132 based" | 190 | tristate "Oren OR51132 based" |
191 | depends on DVB_CORE | 191 | depends on DVB_CORE && I2C |
192 | select FW_LOADER | 192 | select FW_LOADER |
193 | help | 193 | help |
194 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want | 194 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want |
@@ -203,7 +203,7 @@ config DVB_OR51132 | |||
203 | 203 | ||
204 | config DVB_BCM3510 | 204 | config DVB_BCM3510 |
205 | tristate "Broadcom BCM3510" | 205 | tristate "Broadcom BCM3510" |
206 | depends on DVB_CORE | 206 | depends on DVB_CORE && I2C |
207 | select FW_LOADER | 207 | select FW_LOADER |
208 | help | 208 | help |
209 | An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to | 209 | An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to |
@@ -211,7 +211,7 @@ config DVB_BCM3510 | |||
211 | 211 | ||
212 | config DVB_LGDT330X | 212 | config DVB_LGDT330X |
213 | tristate "LG Electronics LGDT3302/LGDT3303 based" | 213 | tristate "LG Electronics LGDT3302/LGDT3303 based" |
214 | depends on DVB_CORE | 214 | depends on DVB_CORE && I2C |
215 | help | 215 | help |
216 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want | 216 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want |
217 | to support this frontend. | 217 | to support this frontend. |
@@ -220,15 +220,19 @@ config DVB_LGDT330X | |||
220 | comment "Miscellaneous devices" | 220 | comment "Miscellaneous devices" |
221 | depends on DVB_CORE | 221 | depends on DVB_CORE |
222 | 222 | ||
223 | config DVB_PLL | ||
224 | tristate | ||
225 | depends on DVB_CORE && I2C | ||
226 | |||
223 | config DVB_LNBP21 | 227 | config DVB_LNBP21 |
224 | tristate "LNBP21 SEC controller" | 228 | tristate "LNBP21 SEC controller" |
225 | depends on DVB_CORE | 229 | depends on DVB_CORE && I2C |
226 | help | 230 | help |
227 | An SEC control chip. | 231 | An SEC control chip. |
228 | 232 | ||
229 | config DVB_ISL6421 | 233 | config DVB_ISL6421 |
230 | tristate "ISL6421 SEC controller" | 234 | tristate "ISL6421 SEC controller" |
231 | depends on DVB_CORE | 235 | depends on DVB_CORE && I2C |
232 | help | 236 | help |
233 | An SEC control chip. | 237 | An SEC control chip. |
234 | 238 | ||
diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile index 5222245c7f59..0e4880b6db14 100644 --- a/drivers/media/dvb/frontends/Makefile +++ b/drivers/media/dvb/frontends/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ | 5 | EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ |
6 | 6 | ||
7 | obj-$(CONFIG_DVB_CORE) += dvb-pll.o | 7 | obj-$(CONFIG_DVB_PLL) += dvb-pll.o |
8 | obj-$(CONFIG_DVB_STV0299) += stv0299.o | 8 | obj-$(CONFIG_DVB_STV0299) += stv0299.o |
9 | obj-$(CONFIG_DVB_SP8870) += sp8870.o | 9 | obj-$(CONFIG_DVB_SP8870) += sp8870.o |
10 | obj-$(CONFIG_DVB_CX22700) += cx22700.o | 10 | obj-$(CONFIG_DVB_CX22700) += cx22700.o |
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c index a189683454b7..2be33f27c69f 100644 --- a/drivers/media/dvb/frontends/dvb-pll.c +++ b/drivers/media/dvb/frontends/dvb-pll.c | |||
@@ -194,11 +194,11 @@ struct dvb_pll_desc dvb_pll_tda665x = { | |||
194 | { 253834000, 36249333, 166667, 0xca, 0x62 /* 011 0 0 0 10 */ }, | 194 | { 253834000, 36249333, 166667, 0xca, 0x62 /* 011 0 0 0 10 */ }, |
195 | { 383834000, 36249333, 166667, 0xca, 0xa2 /* 101 0 0 0 10 */ }, | 195 | { 383834000, 36249333, 166667, 0xca, 0xa2 /* 101 0 0 0 10 */ }, |
196 | { 443834000, 36249333, 166667, 0xca, 0xc2 /* 110 0 0 0 10 */ }, | 196 | { 443834000, 36249333, 166667, 0xca, 0xc2 /* 110 0 0 0 10 */ }, |
197 | { 444000000, 36249333, 166667, 0xca, 0xc3 /* 110 0 0 0 11 */ }, | 197 | { 444000000, 36249333, 166667, 0xca, 0xc4 /* 110 0 0 1 00 */ }, |
198 | { 583834000, 36249333, 166667, 0xca, 0x63 /* 011 0 0 0 11 */ }, | 198 | { 583834000, 36249333, 166667, 0xca, 0x64 /* 011 0 0 1 00 */ }, |
199 | { 793834000, 36249333, 166667, 0xca, 0xa3 /* 101 0 0 0 11 */ }, | 199 | { 793834000, 36249333, 166667, 0xca, 0xa4 /* 101 0 0 1 00 */ }, |
200 | { 444834000, 36249333, 166667, 0xca, 0xc3 /* 110 0 0 0 11 */ }, | 200 | { 444834000, 36249333, 166667, 0xca, 0xc4 /* 110 0 0 1 00 */ }, |
201 | { 861000000, 36249333, 166667, 0xca, 0xe3 /* 111 0 0 0 11 */ }, | 201 | { 861000000, 36249333, 166667, 0xca, 0xe4 /* 111 0 0 1 00 */ }, |
202 | } | 202 | } |
203 | }; | 203 | }; |
204 | EXPORT_SYMBOL(dvb_pll_tda665x); | 204 | EXPORT_SYMBOL(dvb_pll_tda665x); |
@@ -613,7 +613,21 @@ static struct dvb_tuner_ops dvb_pll_tuner_ops = { | |||
613 | 613 | ||
614 | int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc) | 614 | int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc) |
615 | { | 615 | { |
616 | u8 b1 [] = { 0 }; | ||
617 | struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD, .buf = b1, .len = 1 }; | ||
616 | struct dvb_pll_priv *priv = NULL; | 618 | struct dvb_pll_priv *priv = NULL; |
619 | int ret; | ||
620 | |||
621 | if (i2c != NULL) { | ||
622 | if (fe->ops.i2c_gate_ctrl) | ||
623 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
624 | |||
625 | ret = i2c_transfer (i2c, &msg, 1); | ||
626 | if (ret != 1) | ||
627 | return -1; | ||
628 | if (fe->ops.i2c_gate_ctrl) | ||
629 | fe->ops.i2c_gate_ctrl(fe, 0); | ||
630 | } | ||
617 | 631 | ||
618 | priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL); | 632 | priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL); |
619 | if (priv == NULL) | 633 | if (priv == NULL) |
diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c index 55671cb5255e..87c286ee6a00 100644 --- a/drivers/media/dvb/frontends/nxt200x.c +++ b/drivers/media/dvb/frontends/nxt200x.c | |||
@@ -896,9 +896,9 @@ static int nxt2002_init(struct dvb_frontend* fe) | |||
896 | } | 896 | } |
897 | 897 | ||
898 | ret = nxt2002_load_firmware(fe, fw); | 898 | ret = nxt2002_load_firmware(fe, fw); |
899 | release_firmware(fw); | ||
899 | if (ret) { | 900 | if (ret) { |
900 | printk("nxt2002: Writing firmware to device failed\n"); | 901 | printk("nxt2002: Writing firmware to device failed\n"); |
901 | release_firmware(fw); | ||
902 | return ret; | 902 | return ret; |
903 | } | 903 | } |
904 | printk("nxt2002: Firmware upload complete\n"); | 904 | printk("nxt2002: Firmware upload complete\n"); |
@@ -960,9 +960,9 @@ static int nxt2004_init(struct dvb_frontend* fe) | |||
960 | } | 960 | } |
961 | 961 | ||
962 | ret = nxt2004_load_firmware(fe, fw); | 962 | ret = nxt2004_load_firmware(fe, fw); |
963 | release_firmware(fw); | ||
963 | if (ret) { | 964 | if (ret) { |
964 | printk("nxt2004: Writing firmware to device failed\n"); | 965 | printk("nxt2004: Writing firmware to device failed\n"); |
965 | release_firmware(fw); | ||
966 | return ret; | 966 | return ret; |
967 | } | 967 | } |
968 | printk("nxt2004: Firmware upload complete\n"); | 968 | printk("nxt2004: Firmware upload complete\n"); |
diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c index 26bed616fabe..2bf124b53689 100644 --- a/drivers/media/dvb/frontends/or51211.c +++ b/drivers/media/dvb/frontends/or51211.c | |||
@@ -437,10 +437,10 @@ static int or51211_init(struct dvb_frontend* fe) | |||
437 | } | 437 | } |
438 | 438 | ||
439 | ret = or51211_load_firmware(fe, fw); | 439 | ret = or51211_load_firmware(fe, fw); |
440 | release_firmware(fw); | ||
440 | if (ret) { | 441 | if (ret) { |
441 | printk(KERN_WARNING "or51211: Writing firmware to " | 442 | printk(KERN_WARNING "or51211: Writing firmware to " |
442 | "device failed!\n"); | 443 | "device failed!\n"); |
443 | release_firmware(fw); | ||
444 | return ret; | 444 | return ret; |
445 | } | 445 | } |
446 | printk(KERN_INFO "or51211: Firmware upload complete.\n"); | 446 | printk(KERN_INFO "or51211: Firmware upload complete.\n"); |
diff --git a/drivers/media/dvb/frontends/sp8870.c b/drivers/media/dvb/frontends/sp8870.c index 44ec5b9a4695..d98fd5c2e13e 100644 --- a/drivers/media/dvb/frontends/sp8870.c +++ b/drivers/media/dvb/frontends/sp8870.c | |||
@@ -318,7 +318,6 @@ static int sp8870_init (struct dvb_frontend* fe) | |||
318 | printk("sp8870: waiting for firmware upload (%s)...\n", SP8870_DEFAULT_FIRMWARE); | 318 | printk("sp8870: waiting for firmware upload (%s)...\n", SP8870_DEFAULT_FIRMWARE); |
319 | if (state->config->request_firmware(fe, &fw, SP8870_DEFAULT_FIRMWARE)) { | 319 | if (state->config->request_firmware(fe, &fw, SP8870_DEFAULT_FIRMWARE)) { |
320 | printk("sp8870: no firmware upload (timeout or file not found?)\n"); | 320 | printk("sp8870: no firmware upload (timeout or file not found?)\n"); |
321 | release_firmware(fw); | ||
322 | return -EIO; | 321 | return -EIO; |
323 | } | 322 | } |
324 | 323 | ||
@@ -327,6 +326,7 @@ static int sp8870_init (struct dvb_frontend* fe) | |||
327 | release_firmware(fw); | 326 | release_firmware(fw); |
328 | return -EIO; | 327 | return -EIO; |
329 | } | 328 | } |
329 | release_firmware(fw); | ||
330 | printk("sp8870: firmware upload complete\n"); | 330 | printk("sp8870: firmware upload complete\n"); |
331 | 331 | ||
332 | /* enable TS output and interface pins */ | 332 | /* enable TS output and interface pins */ |
diff --git a/drivers/media/dvb/frontends/sp887x.c b/drivers/media/dvb/frontends/sp887x.c index b0a2b02f6608..5c2f8f4e0ae5 100644 --- a/drivers/media/dvb/frontends/sp887x.c +++ b/drivers/media/dvb/frontends/sp887x.c | |||
@@ -520,9 +520,9 @@ static int sp887x_init(struct dvb_frontend* fe) | |||
520 | } | 520 | } |
521 | 521 | ||
522 | ret = sp887x_initial_setup(fe, fw); | 522 | ret = sp887x_initial_setup(fe, fw); |
523 | release_firmware(fw); | ||
523 | if (ret) { | 524 | if (ret) { |
524 | printk("sp887x: writing firmware to device failed\n"); | 525 | printk("sp887x: writing firmware to device failed\n"); |
525 | release_firmware(fw); | ||
526 | return ret; | 526 | return ret; |
527 | } | 527 | } |
528 | printk("sp887x: firmware upload complete\n"); | 528 | printk("sp887x: firmware upload complete\n"); |