Made some basic changes to your original code: (1) you had poll_taks() defined twice, so I changed it; (2) I placed the polling thread above kthread_run(); (3) modified the thread function so that it is simpler. It basically checks the status register and calls the irq when necessary; (4) changed original Makefile with the one Franco provided us with—I think they are both exactly similar though.