Hi,
I am trying to learn Kthreads.following is the code i have written which will toggle two leds one after another in a thread which i want to run always.but it toggle only once.Please guide how to make this toggling happening always.

static int driver_init(void)
{
int err = 0;

int ret;
// io operations
printk("LED Toggel Thread\n");

thread_task = kthread_run(fsg_main_thread, NULL,
shortname);
// Hello world!
return 0;
}
static int fsg_main_thread()
{
long int i;

while(!kthread_should_stop()){
printk("Before DATAOUT------------------\n");
for (i=0; i<0x10000000; i++)
{
if(i==0)
printk("...............In delay.................\n");
}
printk(".................Toggling led ............\n");
*dataout ^= LED0; // Toggle GPIO_150
*dataout ^= LED1; // Toggle GPIO_149

set_current_state(TASK_INTERRUPTIBLE);
schedule();
}
set_current_state(TASK_RUNNING);
printk("After DATAOUT------------------\n");

return SUCCESS;
}