mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
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:
parent
52bad64d95
commit
6bb49e5965
3 changed files with 10 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue