]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - ps.c
iw: remove cb from arguments and simplify valid handler
[thirdparty/iw.git] / ps.c
diff --git a/ps.c b/ps.c
index 4c8e2d1904859384d2cf81998ee0888f63651129..b774b7e5da22d93e0d7c340adadced2f47dcb60a 100644 (file)
--- a/ps.c
+++ b/ps.c
@@ -9,7 +9,6 @@
 #include "iw.h"
 
 static int set_power_save(struct nl80211_state *state,
-                         struct nl_cb *cb,
                          struct nl_msg *msg,
                          int argc, char **argv,
                          enum id_input id)
@@ -70,13 +69,11 @@ static int print_power_save_handler(struct nl_msg *msg, void *arg)
 }
 
 static int get_power_save(struct nl80211_state *state,
-                                  struct nl_cb *cb,
-                                  struct nl_msg *msg,
-                                  int argc, char **argv,
-                                  enum id_input id)
+                         struct nl_msg *msg,
+                         int argc, char **argv,
+                         enum id_input id)
 {
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM,
-                 print_power_save_handler, NULL);
+       register_handler(print_power_save_handler, NULL);
        return 0;
 }