diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-01-14 09:29:07 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-03-09 16:02:39 -0500 |
commit | 21ebcd1224d05c8673053e1e93ab9ec7ef3e0b84 (patch) | |
tree | 1f6f1c05bc8c0fa814a2265ca8dbb24e92bdcab9 /drivers/firewire/fw-transaction.h | |
parent | 227e7d8194bd147484f6ae135a082ce22112b5b3 (diff) |
firewire: mark some structs const
Instances of struct file_operations and struct fw_card_driver can be
qualified as "const". Ditto with struct fw_descriptor.data, struct
fw_device_id, and predefined instances of struct fw_address_region,
at least in the current implementation.
Data qualified as const is placed into the .rodata section which won't
be mixed with dirty data.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-transaction.h')
-rw-r--r-- | drivers/firewire/fw-transaction.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index 292add509102..2f849c813a4c 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h | |||
@@ -133,7 +133,7 @@ struct fw_descriptor { | |||
133 | struct list_head link; | 133 | struct list_head link; |
134 | size_t length; | 134 | size_t length; |
135 | u32 key; | 135 | u32 key; |
136 | u32 *data; | 136 | const u32 *data; |
137 | }; | 137 | }; |
138 | 138 | ||
139 | int fw_core_add_descriptor (struct fw_descriptor *desc); | 139 | int fw_core_add_descriptor (struct fw_descriptor *desc); |
@@ -218,14 +218,14 @@ struct fw_address_region { | |||
218 | u64 end; | 218 | u64 end; |
219 | }; | 219 | }; |
220 | 220 | ||
221 | extern struct fw_address_region fw_low_memory_region; | 221 | extern const struct fw_address_region fw_low_memory_region; |
222 | extern struct fw_address_region fw_high_memory_region; | 222 | extern const struct fw_address_region fw_high_memory_region; |
223 | extern struct fw_address_region fw_private_region; | 223 | extern const struct fw_address_region fw_private_region; |
224 | extern struct fw_address_region fw_csr_region; | 224 | extern const struct fw_address_region fw_csr_region; |
225 | extern struct fw_address_region fw_unit_space_region; | 225 | extern const struct fw_address_region fw_unit_space_region; |
226 | 226 | ||
227 | int fw_core_add_address_handler(struct fw_address_handler *handler, | 227 | int fw_core_add_address_handler(struct fw_address_handler *handler, |
228 | struct fw_address_region *region); | 228 | const struct fw_address_region *region); |
229 | void fw_core_remove_address_handler(struct fw_address_handler *handler); | 229 | void fw_core_remove_address_handler(struct fw_address_handler *handler); |
230 | void fw_send_response(struct fw_card *card, | 230 | void fw_send_response(struct fw_card *card, |
231 | struct fw_request *request, int rcode); | 231 | struct fw_request *request, int rcode); |
@@ -233,7 +233,7 @@ void fw_send_response(struct fw_card *card, | |||
233 | extern struct bus_type fw_bus_type; | 233 | extern struct bus_type fw_bus_type; |
234 | 234 | ||
235 | struct fw_card { | 235 | struct fw_card { |
236 | struct fw_card_driver *driver; | 236 | const struct fw_card_driver *driver; |
237 | struct device *device; | 237 | struct device *device; |
238 | 238 | ||
239 | int node_id; | 239 | int node_id; |
@@ -399,7 +399,7 @@ fw_node_event(struct fw_card *card, struct fw_node *node, int event); | |||
399 | /* Do we need phy speed here also? If we add more args, maybe we | 399 | /* Do we need phy speed here also? If we add more args, maybe we |
400 | should go back to struct fw_card_info. */ | 400 | should go back to struct fw_card_info. */ |
401 | void | 401 | void |
402 | fw_card_initialize(struct fw_card *card, struct fw_card_driver *driver, | 402 | fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver, |
403 | struct device *device); | 403 | struct device *device); |
404 | int | 404 | int |
405 | fw_card_add(struct fw_card *card, | 405 | fw_card_add(struct fw_card *card, |