-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Somebody in the thread at some point said: | 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. :)
WAH... huh... why don't I? You're quite right. - -Andy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkhaNUwACgkQOjLpvpq7dMoyPACeNcwfRrJF+sGKOKe+mkBhOAVg wo0AnjpHArRNX9Fp5WzjmXnrFq19butY =xKkw -----END PGP SIGNATURE-----