if (!(corgi_ts = kmalloc(sizeof(struct corgi_ts), GFP_KERNEL))) return -ENOMEM; 
corgi_ts = kzalloc(sizeof(struct corgi_ts), GFP_KERNEL); input_dev = input_allocate_device(); if (!corgi_ts || !input_dev) goto fail; 
static int __init corgits_probe(struct device *dev){	struct corgi_ts *corgi_ts;	struct platform_device *pdev = to_platform_device(dev);	if (!(corgi_ts = kmalloc(sizeof(struct corgi_ts), GFP_KERNEL)))		return -ENOMEM;	dev_set_drvdata(dev, corgi_ts);	memset(corgi_ts, 0, sizeof(struct corgi_ts));	corgi_ts->machinfo = dev->platform_data;	corgi_ts->irq_gpio = platform_get_irq(pdev, 0);	if (corgi_ts->irq_gpio < 0) {		kfree(corgi_ts);		return -ENODEV;	}	init_input_dev(&corgi_ts->input);	corgi_ts->input.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);	corgi_ts->input.keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);	input_set_abs_params(&corgi_ts->input, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0);	input_set_abs_params(&corgi_ts->input, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0);	input_set_abs_params(&corgi_ts->input, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0);	strcpy(corgi_ts->phys, "corgits/input0");	corgi_ts->input.private = corgi_ts;	corgi_ts->input.name = "Corgi Touchscreen";	corgi_ts->input.dev = dev;	corgi_ts->input.phys = corgi_ts->phys;	corgi_ts->input.id.bustype = BUS_HOST;	corgi_ts->input.id.vendor = 0x0001;	corgi_ts->input.id.product = 0x0002;	corgi_ts->input.id.version = 0x0100;	pxa_gpio_mode(IRQ_TO_GPIO(corgi_ts->irq_gpio) | GPIO_IN);	/* Initiaize ADS7846 Difference Reference mode */	corgi_ssp_ads7846_putget((1u << ADSCTRL_ADR_SH) | ADSCTRL_STS);	mdelay(5);	corgi_ssp_ads7846_putget((3u << ADSCTRL_ADR_SH) | ADSCTRL_STS);	mdelay(5);	corgi_ssp_ads7846_putget((4u << ADSCTRL_ADR_SH) | ADSCTRL_STS);	mdelay(5);	corgi_ssp_ads7846_putget((5u << ADSCTRL_ADR_SH) | ADSCTRL_STS);	mdelay(5);	init_timer(&corgi_ts->timer);	corgi_ts->timer.data = (unsigned long) corgi_ts;	corgi_ts->timer.function = corgi_ts_timer;	input_register_device(&corgi_ts->input);	corgi_ts->power_mode = PWR_MODE_ACTIVE;	if (request_irq(corgi_ts->irq_gpio, ts_interrupt, SA_INTERRUPT, "ts", corgi_ts)) {		input_unregister_device(&corgi_ts->input);		kfree(corgi_ts);		return -EBUSY;	}	/* Enable Falling Edge */	set_irq_type(corgi_ts->irq_gpio, IRQT_FALLING);	printk(KERN_INFO "input: Corgi Touchscreen Registered\n");	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/eca1ed196cd5b523c1057204cd3672555ad58dfe/corgi_ts.c/clean/drivers/input/touchscreen/corgi_ts.c