summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/drxk_hard.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-10-02 16:01:15 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-02 17:15:16 -0300
commit8e30783b0b3270736b2cff6415c68b894bc411df (patch)
tree0b409be3cff1bc39831f10b62a594832e3013387 /drivers/media/dvb-frontends/drxk_hard.c
parent6ae5e060840589f567c1837613e8a9d34fc9188a (diff)
drxk: allow loading firmware synchrousnously
Due to udev-182, the firmware load was changed to be async, as otherwise udev would give up of loading a firmware. Add an option to return to the previous behaviour, async firmware loads cause failures with the tda18271 driver. Antti tested it with the following hardware: Hauppauge WinTV HVR 930C MaxMedia UB425-TC PCTV QuatroStick nano (520e) Tested-by: Antti Palosaari <crope@iki.fi> Cc: stable@kernel.org # for Kernel 3.6 - please note that driver location has changed Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends/drxk_hard.c')
-rw-r--r--drivers/media/dvb-frontends/drxk_hard.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c
index 1ab8154542d..8b4c6d5f8f3 100644
--- a/drivers/media/dvb-frontends/drxk_hard.c
+++ b/drivers/media/dvb-frontends/drxk_hard.c
@@ -6609,15 +6609,25 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
/* Load firmware and initialize DRX-K */
if (state->microcode_name) {
- status = request_firmware_nowait(THIS_MODULE, 1,
+ if (config->load_firmware_sync) {
+ const struct firmware *fw = NULL;
+
+ status = request_firmware(&fw, state->microcode_name,
+ state->i2c->dev.parent);
+ if (status < 0)
+ fw = NULL;
+ load_firmware_cb(fw, state);
+ } else {
+ status = request_firmware_nowait(THIS_MODULE, 1,
state->microcode_name,
state->i2c->dev.parent,
GFP_KERNEL,
state, load_firmware_cb);
- if (status < 0) {
- printk(KERN_ERR
- "drxk: failed to request a firmware\n");
- return NULL;
+ if (status < 0) {
+ printk(KERN_ERR
+ "drxk: failed to request a firmware\n");
+ return NULL;
+ }
}
} else if (init_drxk(state) < 0)
goto error;