summaryrefslogtreecommitdiff
path: root/firmware/ata_idle_notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/ata_idle_notify.c')
-rw-r--r--firmware/ata_idle_notify.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/ata_idle_notify.c b/firmware/ata_idle_notify.c
index 99b1d4d786..35d192bee0 100644
--- a/firmware/ata_idle_notify.c
+++ b/firmware/ata_idle_notify.c
@@ -25,12 +25,12 @@
25#include "kernel.h" 25#include "kernel.h"
26#include "string.h" 26#include "string.h"
27 27
28void register_storage_idle_func(storage_idle_notify function) 28void register_storage_idle_func(void (*function)(void *data))
29{ 29{
30#if USING_STORAGE_CALLBACK 30#if USING_STORAGE_CALLBACK
31 add_event(DISK_EVENT_SPINUP, true, function); 31 add_event(DISK_EVENT_SPINUP, true, function);
32#else 32#else
33 function(); /* just call the function now */ 33 function(NULL); /* just call the function now */
34/* this _may_ cause problems later if the calling function 34/* this _may_ cause problems later if the calling function
35 sets a variable expecting the callback to unset it, because 35 sets a variable expecting the callback to unset it, because
36 the callback will be run before this function exits, so before the var is set */ 36 the callback will be run before this function exits, so before the var is set */
@@ -38,12 +38,12 @@ void register_storage_idle_func(storage_idle_notify function)
38} 38}
39 39
40#if USING_STORAGE_CALLBACK 40#if USING_STORAGE_CALLBACK
41void unregister_storage_idle_func(storage_idle_notify func, bool run) 41void unregister_storage_idle_func(void (*func)(void *data), bool run)
42{ 42{
43 remove_event(DISK_EVENT_SPINUP, func); 43 remove_event(DISK_EVENT_SPINUP, func);
44 44
45 if (run) 45 if (run)
46 func(); 46 func(NULL);
47} 47}
48 48
49bool call_storage_idle_notifys(bool force) 49bool call_storage_idle_notifys(bool force)