WorkStruct: Typedef the work function prototype

Define a type for the work function prototype.  It's not only kept in the
work_struct struct, it's also passed as an argument to several functions.

This makes it easier to change it.

Signed-Off-By: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells 2006-11-22 14:54:45 +00:00
commit 6bb49e5965
3 changed files with 10 additions and 9 deletions

View file

@ -996,7 +996,7 @@ static DECLARE_WORK(floppy_work, NULL, NULL);
static void schedule_bh(void (*handler) (void))
{
PREPARE_WORK(&floppy_work, (void (*)(void *))handler, NULL);
PREPARE_WORK(&floppy_work, (work_func_t)handler, NULL);
schedule_work(&floppy_work);
}
@ -1008,7 +1008,7 @@ static void cancel_activity(void)
spin_lock_irqsave(&floppy_lock, flags);
do_floppy = NULL;
PREPARE_WORK(&floppy_work, (void *)empty, NULL);
PREPARE_WORK(&floppy_work, (work_func_t)empty, NULL);
del_timer(&fd_timer);
spin_unlock_irqrestore(&floppy_lock, flags);
}