printk("msp3400: error while reading chip version\n"); 
dprintk("msp34xx: error while reading chip version\n"); 
static int msp_attach(struct i2c_adapter *adap, int addr, int kind){	struct msp3400c *msp;        struct i2c_client *c;	int (*thread_func)(void *data) = NULL;        client_template.adapter = adap;        client_template.addr = addr;        if (-1 == msp3400c_reset(&client_template)) {                dprintk("msp3400: no chip found\n");                return -1;        }        if (NULL == (c = kmalloc(sizeof(struct i2c_client),GFP_KERNEL)))                return -ENOMEM;        memcpy(c,&client_template,sizeof(struct i2c_client));	if (NULL == (msp = kmalloc(sizeof(struct msp3400c),GFP_KERNEL))) {		kfree(c);		return -ENOMEM;	}	memset(msp,0,sizeof(struct msp3400c));	msp->volume  = 58880;  /* 0db gain */	msp->balance = 32768;	msp->bass    = 32768;	msp->treble  = 32768;	msp->input   = -1;	msp->muted   = 1;	i2c_set_clientdata(c, msp);	init_waitqueue_head(&msp->wq);	if (-1 == msp3400c_reset(c)) {		kfree(msp);		kfree(c);		dprintk("msp3400: no chip found\n");		return -1;	}	msp->rev1 = msp3400c_read(c, I2C_MSP3400C_DFP, 0x1e);	if (-1 != msp->rev1)		msp->rev2 = msp3400c_read(c, I2C_MSP3400C_DFP, 0x1f);	if ((-1 == msp->rev1) || (0 == msp->rev1 && 0 == msp->rev2)) {		kfree(msp);		kfree(c);		printk("msp3400: error while reading chip version\n");		return -1;	}	msp3400c_setvolume(c, msp->muted, msp->volume, msp->balance);	snprintf(c->name, sizeof(c->name), "MSP34%02d%c-%c%d",		 (msp->rev2>>8)&0xff, (msp->rev1&0xff)+'@',		 ((msp->rev1>>8)&0xff)+'@', msp->rev2&0x1f);	msp->opmode = opmode;	if (OPMODE_AUTO == msp->opmode) {		if (HAVE_SIMPLER(msp))			msp->opmode = OPMODE_SIMPLER;		else if (HAVE_SIMPLE(msp))			msp->opmode = OPMODE_SIMPLE;		else			msp->opmode = OPMODE_MANUAL;	}	/* hello world :-) */	printk(KERN_INFO "msp34xx: init: chip=%s", c->name);	if (HAVE_NICAM(msp))		printk(" +nicam");	if (HAVE_SIMPLE(msp))		printk(" +simple");	if (HAVE_SIMPLER(msp))		printk(" +simpler");	if (HAVE_RADIO(msp))		printk(" +radio");	/* version-specific initialization */	switch (msp->opmode) {	case OPMODE_MANUAL:		printk(" mode=manual");		thread_func = msp3400c_thread;		break;	case OPMODE_SIMPLE:		printk(" mode=simple");		thread_func = msp3410d_thread;		break;	case OPMODE_SIMPLER:		printk(" mode=simpler");		thread_func = msp34xxg_thread;		break;	}	printk("\n");	/* startup control thread if needed */	if (thread_func) {		msp->kthread = kthread_run(thread_func, c, "msp34xx");		if (NULL == msp->kthread)			printk(KERN_WARNING "msp34xx: kernel_thread() failed\n");		msp_wake_thread(c);	}	/* done */        i2c_attach_client(c);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c0e9eae60e8f1a18e2e6502b3e738dd2886d18ff/msp3400.c/clean/drivers/media/video/msp3400.c