X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fmedia%2Fdvb%2Ffrontends%2For51211.c;h=2bf124b5368931da77a2320acd4c471e337a3087;hp=531f76246e5f71bdd226632f4f908a5d8fcc60ec;hb=7b69a4c360e8787877ebf5e42609b8bab13afa6a;hpb=78b9c0f91cf908616b8f9f356e1d1220e727ea88 diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c index 531f76246e5f..2bf124b53689 100644 --- a/drivers/media/dvb/frontends/or51211.c +++ b/drivers/media/dvb/frontends/or51211.c @@ -25,7 +25,8 @@ /* * This driver needs external firmware. Please use the command * "/Documentation/dvb/get_dvb_firmware or51211" to - * download/extract it, and then copy it to /usr/lib/hotplug/firmware. + * download/extract it, and then copy it to /usr/lib/hotplug/firmware + * or /lib/firmware (depending on configuration of firmware hotplug). */ #define OR51211_DEFAULT_FIRMWARE "dvb-fe-or51211.fw" @@ -53,7 +54,6 @@ static u8 cmd_buf[] = {0x04,0x01,0x50,0x80,0x06}; // ATSC struct or51211_state { struct i2c_adapter* i2c; - struct dvb_frontend_ops ops; /* Configuration settings */ const struct or51211_config* config; @@ -112,7 +112,7 @@ static int or51211_load_firmware (struct dvb_frontend* fe, u8 tudata[585]; int i; - dprintk("Firmware is %d bytes\n",fw->size); + dprintk("Firmware is %zd bytes\n",fw->size); /* Get eprom data */ tudata[0] = 17; @@ -437,10 +437,10 @@ static int or51211_init(struct dvb_frontend* fe) } ret = or51211_load_firmware(fe, fw); + release_firmware(fw); if (ret) { printk(KERN_WARNING "or51211: Writing firmware to " "device failed!\n"); - release_firmware(fw); return ret; } printk(KERN_INFO "or51211: Firmware upload complete.\n"); @@ -584,12 +584,11 @@ struct dvb_frontend* or51211_attach(const struct or51211_config* config, /* Setup the state */ state->config = config; state->i2c = i2c; - memcpy(&state->ops, &or51211_ops, sizeof(struct dvb_frontend_ops)); state->initialized = 0; state->current_frequency = 0; /* Create dvb_frontend */ - state->frontend.ops = &state->ops; + memcpy(&state->frontend.ops, &or51211_ops, sizeof(struct dvb_frontend_ops)); state->frontend.demodulator_priv = state; return &state->frontend;