[PATCH] touchscreen-meddling.patch

Holger Freyther zecke at openmoko.org
Thu Jun 19 12:06:15 CEST 2008


On Wednesday 18 June 2008 16:51:08 Andy Green wrote:

>  static irqreturn_t stylus_action(int irq, void *dev_id)
>  {
> -	unsigned long data0;
> -	unsigned long data1;
> -
> -	data0 = readl(base_addr+S3C2410_ADCDAT0);
> -	data1 = readl(base_addr+S3C2410_ADCDAT1);
> +	unsigned long x;
> +	unsigned long y;
> +	int length = (ts.head_raw_fifo - ts.tail_raw_fifo) & (ts.extent - 1);
> +	int scaled_avg_x = ts.raw_running_avg.x / length;
> +	int scaled_avg_y = ts.raw_running_avg.y / length;

I get a div by zero here. :)

z.




More information about the openmoko-kernel mailing list