--- drivers/media/dvb/frontends/tda1004x.c.new 2004-07-12 00:16:41.000000000 +0100 +++ drivers/media/dvb/frontends/tda1004x.c 2004-07-12 00:11:37.000000000 +0100 @@ -184,7 +184,8 @@ int fw_offset; int fw_size; }; -static struct fwinfo tda10045h_fwinfo[] = { {.file_size = 286720,.fw_offset = 0x34cc5,.fw_size = 30555} }; +static struct fwinfo tda10045h_fwinfo[] = { {.file_size = 286720,.fw_offset = 0x34cc5,.fw_size = 30555}, + {.file_size = 303104,.fw_offset = 0x37ef9,.fw_size = 30554} }; static int tda10045h_fwinfo_count = sizeof(tda10045h_fwinfo) / sizeof(struct fwinfo); static struct fwinfo tda10046h_fwinfo[] = { {.file_size = 286720,.fw_offset = 0x3c4f9,.fw_size = 24479} }; @@ -1306,7 +1307,7 @@ { int status = 0; struct dvb_i2c_bus *i2c = fe->i2c; - struct tda1004x_state *tda_state = (struct tda1004x_state *) fe->data; + struct tda1004x_state *tda_state = (struct tda1004x_state *) &(fe->data); dprintk("%s: cmd=0x%x\n", __FUNCTION__, cmd); @@ -1368,6 +1369,7 @@ tda_state->initialised = 1; return status; +#if 0 case FE_GET_TUNE_SETTINGS: { struct dvb_frontend_tune_settings* fesettings = (struct dvb_frontend_tune_settings*) arg; @@ -1376,6 +1378,7 @@ fesettings->max_drift = 166667*2; return 0; } +#endif default: return -EOPNOTSUPP; @@ -1392,7 +1395,7 @@ int fe_type = -1; int tuner_type = -1; struct tda1004x_state tda_state; - struct tda1004x_state* ptda_state; +// struct tda1004x_state* ptda_state; struct i2c_msg tuner_msg = {.addr=0, .flags=0, .buf=0, .len=0 }; static u8 td1344_init[] = { 0x0b, 0xf5, 0x88, 0xab }; static u8 td1316_init[] = { 0x0b, 0xf5, 0x85, 0xab }; @@ -1485,20 +1488,24 @@ // upload firmware if ((status = tda1004x_fwupload(i2c, &tda_state)) != 0) return status; +#if 0 // create the real state we'll be passing about if ((ptda_state = (struct tda1004x_state*) kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL)) == NULL) { return -ENOMEM; } memcpy(ptda_state, &tda_state, sizeof(struct tda1004x_state)); *data = ptda_state; +#endif // register switch(tda_state.fe_type) { case FE_TYPE_TDA10045H: - return dvb_register_frontend(tda1004x_ioctl, i2c, ptda_state, &tda10045h_info); + return dvb_register_frontend(tda1004x_ioctl, i2c, (void *)(*((u32*) &tda_state)), &tda10045h_info); +// return dvb_register_frontend(tda1004x_ioctl, i2c, ptda_state, &tda10045h_info); case FE_TYPE_TDA10046H: - return dvb_register_frontend(tda1004x_ioctl, i2c, ptda_state, &tda10046h_info); + return dvb_register_frontend(tda1004x_ioctl, i2c, (void *)(*((u32*) &tda_state)), &tda10046h_info); +// return dvb_register_frontend(tda1004x_ioctl, i2c, ptda_state, &tda10046h_info); } // should not get here