isp = kcalloc(1, sizeof *isp, GFP_KERNEL); 
isp = kzalloc(sizeof *isp, GFP_KERNEL); 
static int isp1301_probe(struct i2c_adapter *bus, int address, int kind){	int			status;	struct isp1301		*isp;	struct i2c_client	*i2c;	if (the_transceiver)		return 0;	isp = kcalloc(1, sizeof *isp, GFP_KERNEL);	if (!isp)		return 0;	INIT_WORK(&isp->work, isp1301_work, isp);	init_timer(&isp->timer);	isp->timer.function = isp1301_timer;	isp->timer.data = (unsigned long) isp;	isp->irq = -1;	isp->client.addr = address;	i2c_set_clientdata(&isp->client, isp);	isp->client.adapter = bus;	isp->client.driver = &isp1301_driver;	strlcpy(isp->client.name, DRIVER_NAME, I2C_NAME_SIZE);	i2c = &isp->client;	/* if this is a true probe, verify the chip ... */	if (kind < 0) {		status = isp1301_get_u16(isp, ISP1301_VENDOR_ID);		if (status != I2C_VENDOR_ID_PHILIPS) {			dev_dbg(&bus->dev, "addr %d not philips id: %d\n",				address, status);			goto fail1;		}		status = isp1301_get_u16(isp, ISP1301_PRODUCT_ID);		if (status != I2C_PRODUCT_ID_PHILIPS_1301) {			dev_dbg(&bus->dev, "%d not isp1301, %d\n",				address, status);			goto fail1;		}	}	status = i2c_attach_client(i2c);	if (status < 0) {		dev_dbg(&bus->dev, "can't attach %s to device %d, err %d\n",				DRIVER_NAME, address, status);fail1:		kfree(isp);		return 0;	}	isp->i2c_release = i2c->dev.release;	i2c->dev.release = isp1301_release;	/* initial development used chiprev 2.00 */	status = i2c_smbus_read_word_data(i2c, ISP1301_BCD_DEVICE);	dev_info(&i2c->dev, "chiprev %x.%02x, driver " DRIVER_VERSION "\n",		status >> 8, status & 0xff);	/* make like power-on reset */	isp1301_clear_bits(isp, ISP1301_MODE_CONTROL_1, MC1_MASK);	isp1301_set_bits(isp, ISP1301_MODE_CONTROL_2, MC2_BI_DI);	isp1301_clear_bits(isp, ISP1301_MODE_CONTROL_2, ~MC2_BI_DI);	isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1,				OTG1_DM_PULLDOWN | OTG1_DP_PULLDOWN);	isp1301_clear_bits(isp, ISP1301_OTG_CONTROL_1,				~(OTG1_DM_PULLDOWN | OTG1_DP_PULLDOWN));	isp1301_clear_bits(isp, ISP1301_INTERRUPT_LATCH, ~0);	isp1301_clear_bits(isp, ISP1301_INTERRUPT_FALLING, ~0);	isp1301_clear_bits(isp, ISP1301_INTERRUPT_RISING, ~0);#ifdef	CONFIG_USB_OTG	status = otg_bind(isp);	if (status < 0) {		dev_dbg(&i2c->dev, "can't bind OTG\n");		goto fail2;	}#endif	if (machine_is_omap_h2()) {		/* full speed signaling by default */		isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1,			MC1_SPEED_REG);		isp1301_set_bits(isp, ISP1301_MODE_CONTROL_2,			MC2_SPD_SUSP_CTRL);		/* IRQ wired at M14 */		omap_cfg_reg(M14_1510_GPIO2);		isp->irq = OMAP_GPIO_IRQ(2);		omap_request_gpio(2);		omap_set_gpio_direction(2, 1);		omap_set_gpio_edge_ctrl(2, OMAP_GPIO_FALLING_EDGE);	}	status = request_irq(isp->irq, isp1301_irq,			SA_SAMPLE_RANDOM, DRIVER_NAME, isp);	if (status < 0) {		dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n",				isp->irq, status);#ifdef	CONFIG_USB_OTGfail2:#endif		i2c_detach_client(i2c);		goto fail1;	}	isp->otg.dev = &isp->client.dev;	isp->otg.label = DRIVER_NAME;	isp->otg.set_host = isp1301_set_host,	isp->otg.set_peripheral = isp1301_set_peripheral,	isp->otg.set_power = isp1301_set_power,	isp->otg.start_srp = isp1301_start_srp,	isp->otg.start_hnp = isp1301_start_hnp,	enable_vbus_draw(isp, 0);	power_down(isp);	the_transceiver = isp;#ifdef	CONFIG_USB_OTG	update_otg1(isp, isp1301_get_u8(isp, ISP1301_INTERRUPT_SOURCE));	update_otg2(isp, isp1301_get_u8(isp, ISP1301_OTG_STATUS));#endif	dump_regs(isp, __FUNCTION__);#ifdef	VERBOSE	mod_timer(&isp->timer, jiffies + TIMER_JIFFIES);	dev_dbg(&i2c->dev, "scheduled timer, %d min\n", TIMER_MINUTES);#endif	status = otg_set_transceiver(&isp->otg);	if (status < 0)		dev_err(&i2c->dev, "can't register transceiver, %d\n",			status);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/82ca76b6b160b6fce46f78c069f87fe1a4dc0778/isp1301_omap.c/buggy/drivers/i2c/chips/isp1301_omap.c