diff options
| author | Carlos Chinea <carlos.chinea@nokia.com> | 2012-04-04 07:11:45 -0400 |
|---|---|---|
| committer | Carlos Chinea <carlos.chinea@nokia.com> | 2012-04-23 07:23:31 -0400 |
| commit | 5a218ceba7b64f506bf4f004b04bb457c1805a62 (patch) | |
| tree | f1f123391bbebd8c6136e9118bf8a2f6b0c49734 /include/linux/hsi | |
| parent | 66f75a5d028beaf67c931435fdc3e7823125730c (diff) | |
HSI: hsi: Rework hsi_controller release
Use the proper release mechanism for hsi_controller and
hsi_ports structures. Free the structures through their
associated device release callbacks.
Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/hsi')
| -rw-r--r-- | include/linux/hsi/hsi.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/hsi/hsi.h b/include/linux/hsi/hsi.h index 4b178067f405..7f3b7262a2b6 100644 --- a/include/linux/hsi/hsi.h +++ b/include/linux/hsi/hsi.h | |||
| @@ -270,13 +270,13 @@ struct hsi_controller { | |||
| 270 | struct module *owner; | 270 | struct module *owner; |
| 271 | unsigned int id; | 271 | unsigned int id; |
| 272 | unsigned int num_ports; | 272 | unsigned int num_ports; |
| 273 | struct hsi_port *port; | 273 | struct hsi_port **port; |
| 274 | }; | 274 | }; |
| 275 | 275 | ||
| 276 | #define to_hsi_controller(dev) container_of(dev, struct hsi_controller, device) | 276 | #define to_hsi_controller(dev) container_of(dev, struct hsi_controller, device) |
| 277 | 277 | ||
| 278 | struct hsi_controller *hsi_alloc_controller(unsigned int n_ports, gfp_t flags); | 278 | struct hsi_controller *hsi_alloc_controller(unsigned int n_ports, gfp_t flags); |
| 279 | void hsi_free_controller(struct hsi_controller *hsi); | 279 | void hsi_put_controller(struct hsi_controller *hsi); |
| 280 | int hsi_register_controller(struct hsi_controller *hsi); | 280 | int hsi_register_controller(struct hsi_controller *hsi); |
| 281 | void hsi_unregister_controller(struct hsi_controller *hsi); | 281 | void hsi_unregister_controller(struct hsi_controller *hsi); |
| 282 | 282 | ||
| @@ -294,7 +294,7 @@ static inline void *hsi_controller_drvdata(struct hsi_controller *hsi) | |||
| 294 | static inline struct hsi_port *hsi_find_port_num(struct hsi_controller *hsi, | 294 | static inline struct hsi_port *hsi_find_port_num(struct hsi_controller *hsi, |
| 295 | unsigned int num) | 295 | unsigned int num) |
| 296 | { | 296 | { |
| 297 | return (num < hsi->num_ports) ? &hsi->port[num] : NULL; | 297 | return (num < hsi->num_ports) ? hsi->port[num] : NULL; |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | /* | 300 | /* |
