diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-07-17 13:13:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-17 13:13:21 -0400 |
commit | 0741241c6b80bfd58417e95de984d60c9e9ef2a0 (patch) | |
tree | 9fa70e5e918e0735c531988f64b92cb5655baf28 /include | |
parent | e36aa25a533962b08402530e8443ac804a454e27 (diff) |
connector: make callback argument type explicit
The connector documentation states that the argument to the callback
function is always a pointer to a struct cn_msg, but rather than encode it
in the API itself, it uses a void pointer everywhere. This doesn't make
much sense to encode the pointer in documentation as it prevents proper C
type checking from occurring and can easily allow people to use the wrong
pointer type. So convert the argument type to an explicit struct cn_msg
pointer.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/connector.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/connector.h b/include/linux/connector.h index b68d27850d51..47ebf416f512 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -136,7 +136,7 @@ struct cn_callback_data { | |||
136 | void *ddata; | 136 | void *ddata; |
137 | 137 | ||
138 | void *callback_priv; | 138 | void *callback_priv; |
139 | void (*callback) (void *); | 139 | void (*callback) (struct cn_msg *); |
140 | 140 | ||
141 | void *free; | 141 | void *free; |
142 | }; | 142 | }; |
@@ -167,11 +167,11 @@ struct cn_dev { | |||
167 | struct cn_queue_dev *cbdev; | 167 | struct cn_queue_dev *cbdev; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); | 170 | int cn_add_callback(struct cb_id *, char *, void (*callback) (struct cn_msg *)); |
171 | void cn_del_callback(struct cb_id *); | 171 | void cn_del_callback(struct cb_id *); |
172 | int cn_netlink_send(struct cn_msg *, u32, gfp_t); | 172 | int cn_netlink_send(struct cn_msg *, u32, gfp_t); |
173 | 173 | ||
174 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); | 174 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(struct cn_msg *)); |
175 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 175 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
176 | 176 | ||
177 | int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work); | 177 | int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work); |