aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-11-25 19:35:21 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-01-04 17:50:32 -0500
commitb17a55096071898454d7b5b6fb30cca7faedf9f1 (patch)
treefdba029dc0d01d324a1d7405ef5e80dc0f06039c /drivers
parentadb0a61681224340271bb2c2e1a060434b76ec06 (diff)
ieee1394: mark all hpsb_address_ops instances as const
These are never modified. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ieee1394/csr.c8
-rw-r--r--drivers/ieee1394/eth1394.c2
-rw-r--r--drivers/ieee1394/highlevel.c7
-rw-r--r--drivers/ieee1394/highlevel.h7
-rw-r--r--drivers/ieee1394/raw1394.c2
-rw-r--r--drivers/ieee1394/sbp2.c4
6 files changed, 16 insertions, 14 deletions
diff --git a/drivers/ieee1394/csr.c b/drivers/ieee1394/csr.c
index c90be4070e40..9029b6839f0b 100644
--- a/drivers/ieee1394/csr.c
+++ b/drivers/ieee1394/csr.c
@@ -68,22 +68,22 @@ static struct hpsb_highlevel csr_highlevel = {
68 .host_reset = host_reset, 68 .host_reset = host_reset,
69}; 69};
70 70
71static struct hpsb_address_ops map_ops = { 71const static struct hpsb_address_ops map_ops = {
72 .read = read_maps, 72 .read = read_maps,
73}; 73};
74 74
75static struct hpsb_address_ops fcp_ops = { 75const static struct hpsb_address_ops fcp_ops = {
76 .write = write_fcp, 76 .write = write_fcp,
77}; 77};
78 78
79static struct hpsb_address_ops reg_ops = { 79const static struct hpsb_address_ops reg_ops = {
80 .read = read_regs, 80 .read = read_regs,
81 .write = write_regs, 81 .write = write_regs,
82 .lock = lock_regs, 82 .lock = lock_regs,
83 .lock64 = lock64_regs, 83 .lock64 = lock64_regs,
84}; 84};
85 85
86static struct hpsb_address_ops config_rom_ops = { 86const static struct hpsb_address_ops config_rom_ops = {
87 .read = read_config_rom, 87 .read = read_config_rom,
88}; 88};
89 89
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
index 20128692b339..7ae8bce27569 100644
--- a/drivers/ieee1394/eth1394.c
+++ b/drivers/ieee1394/eth1394.c
@@ -181,7 +181,7 @@ static void ether1394_remove_host(struct hpsb_host *host);
181static void ether1394_host_reset(struct hpsb_host *host); 181static void ether1394_host_reset(struct hpsb_host *host);
182 182
183/* Function for incoming 1394 packets */ 183/* Function for incoming 1394 packets */
184static struct hpsb_address_ops addr_ops = { 184const static struct hpsb_address_ops addr_ops = {
185 .write = ether1394_write, 185 .write = ether1394_write,
186}; 186};
187 187
diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c
index 6cc26edcbd8b..600e391c8fe7 100644
--- a/drivers/ieee1394/highlevel.c
+++ b/drivers/ieee1394/highlevel.c
@@ -320,7 +320,7 @@ void hpsb_unregister_highlevel(struct hpsb_highlevel *hl)
320 */ 320 */
321u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl, 321u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl,
322 struct hpsb_host *host, 322 struct hpsb_host *host,
323 struct hpsb_address_ops *ops, 323 const struct hpsb_address_ops *ops,
324 u64 size, u64 alignment, 324 u64 size, u64 alignment,
325 u64 start, u64 end) 325 u64 start, u64 end)
326{ 326{
@@ -407,7 +407,8 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl,
407 * are automatically deallocated together with the hpsb_highlevel @hl. 407 * are automatically deallocated together with the hpsb_highlevel @hl.
408 */ 408 */
409int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, 409int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
410 struct hpsb_address_ops *ops, u64 start, u64 end) 410 const struct hpsb_address_ops *ops,
411 u64 start, u64 end)
411{ 412{
412 struct hpsb_address_serve *as; 413 struct hpsb_address_serve *as;
413 struct list_head *lh; 414 struct list_head *lh;
@@ -477,7 +478,7 @@ int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
477 return retval; 478 return retval;
478} 479}
479 480
480static struct hpsb_address_ops dummy_ops; 481const static struct hpsb_address_ops dummy_ops;
481 482
482/* dummy address spaces as lower and upper bounds of the host's a.s. list */ 483/* dummy address spaces as lower and upper bounds of the host's a.s. list */
483static void init_hpsb_highlevel(struct hpsb_host *host) 484static void init_hpsb_highlevel(struct hpsb_host *host)
diff --git a/drivers/ieee1394/highlevel.h b/drivers/ieee1394/highlevel.h
index bc5d0854c17e..9dba89fc60ad 100644
--- a/drivers/ieee1394/highlevel.h
+++ b/drivers/ieee1394/highlevel.h
@@ -15,7 +15,7 @@ struct hpsb_host;
15struct hpsb_address_serve { 15struct hpsb_address_serve {
16 struct list_head host_list; /* per host list */ 16 struct list_head host_list; /* per host list */
17 struct list_head hl_list; /* hpsb_highlevel list */ 17 struct list_head hl_list; /* hpsb_highlevel list */
18 struct hpsb_address_ops *op; 18 const struct hpsb_address_ops *op;
19 struct hpsb_host *host; 19 struct hpsb_host *host;
20 u64 start; /* first address handled, quadlet aligned */ 20 u64 start; /* first address handled, quadlet aligned */
21 u64 end; /* first address behind, quadlet aligned */ 21 u64 end; /* first address behind, quadlet aligned */
@@ -119,11 +119,12 @@ void hpsb_unregister_highlevel(struct hpsb_highlevel *hl);
119 119
120u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl, 120u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl,
121 struct hpsb_host *host, 121 struct hpsb_host *host,
122 struct hpsb_address_ops *ops, 122 const struct hpsb_address_ops *ops,
123 u64 size, u64 alignment, 123 u64 size, u64 alignment,
124 u64 start, u64 end); 124 u64 start, u64 end);
125int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, 125int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
126 struct hpsb_address_ops *ops, u64 start, u64 end); 126 const struct hpsb_address_ops *ops,
127 u64 start, u64 end);
127int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, 128int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
128 u64 start); 129 u64 start);
129 130
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index bf7e761c12b1..bad66c65b0d6 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -90,7 +90,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store,
90static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, 90static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store,
91 u64 addr, octlet_t data, octlet_t arg, int ext_tcode, 91 u64 addr, octlet_t data, octlet_t arg, int ext_tcode,
92 u16 flags); 92 u16 flags);
93static struct hpsb_address_ops arm_ops = { 93const static struct hpsb_address_ops arm_ops = {
94 .read = arm_read, 94 .read = arm_read,
95 .write = arm_write, 95 .write = arm_write,
96 .lock = arm_lock, 96 .lock = arm_lock,
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index a373c18cf7b8..ab1034ccb7fb 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -265,7 +265,7 @@ static struct hpsb_highlevel sbp2_highlevel = {
265 .host_reset = sbp2_host_reset, 265 .host_reset = sbp2_host_reset,
266}; 266};
267 267
268static struct hpsb_address_ops sbp2_ops = { 268const static struct hpsb_address_ops sbp2_ops = {
269 .write = sbp2_handle_status_write 269 .write = sbp2_handle_status_write
270}; 270};
271 271
@@ -275,7 +275,7 @@ static int sbp2_handle_physdma_write(struct hpsb_host *, int, int, quadlet_t *,
275static int sbp2_handle_physdma_read(struct hpsb_host *, int, quadlet_t *, u64, 275static int sbp2_handle_physdma_read(struct hpsb_host *, int, quadlet_t *, u64,
276 size_t, u16); 276 size_t, u16);
277 277
278static struct hpsb_address_ops sbp2_physdma_ops = { 278const static struct hpsb_address_ops sbp2_physdma_ops = {
279 .read = sbp2_handle_physdma_read, 279 .read = sbp2_handle_physdma_read,
280 .write = sbp2_handle_physdma_write, 280 .write = sbp2_handle_physdma_write,
281}; 281};