state = (struct tda80xx_state*) kmalloc(sizeof(struct tda80xx_state), GFP_KERNEL); 
state = kmalloc(sizeof(struct tda80xx_state), GFP_KERNEL); 
struct dvb_frontend* tda80xx_attach(const struct tda80xx_config* config,				    struct i2c_adapter* i2c){	struct tda80xx_state* state = NULL;	int ret;	/* allocate memory for the internal state */	state = (struct tda80xx_state*) kmalloc(sizeof(struct tda80xx_state), GFP_KERNEL);	if (state == NULL) goto error;	/* setup the state */	state->config = config;	state->i2c = i2c;	memcpy(&state->ops, &tda80xx_ops, sizeof(struct dvb_frontend_ops));	state->spectral_inversion = INVERSION_AUTO;	state->code_rate = FEC_AUTO;	state->status = 0;	state->afc_loop = 0;	/* check if the demod is there */	if (tda80xx_writereg(state, 0x89, 0x00) < 0) goto error;	state->id = tda80xx_readreg(state, 0x00);	switch (state->id) {	case ID_TDA8044:		state->clk = 96000000;		printk("tda80xx: Detected tda8044\n");		break;	case ID_TDA8083:		state->clk = 64000000;		printk("tda80xx: Detected tda8083\n");		break;	default:		goto error;	}	/* setup IRQ */	if (state->config->irq) {		INIT_WORK(&state->worklet, tda80xx_worklet, state);		if ((ret = request_irq(state->config->irq, tda80xx_irq, SA_ONESHOT, "tda80xx", &state->worklet)) < 0) {			printk(KERN_ERR "tda80xx: request_irq failed (%d)\n", ret);			goto error;		}	}	/* create dvb_frontend */	state->frontend.ops = &state->ops;	state->frontend.demodulator_priv = state;	return &state->frontend;error:	kfree(state);	return NULL;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b8742700f13163ffa00cddce2a3c940b9ab2ab5a/tda80xx.c/clean/drivers/media/dvb/frontends/tda80xx.c