]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ieee1394: mark all hpsb_address_ops instances as const
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 26 Nov 2008 00:35:21 +0000 (01:35 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 4 Jan 2009 22:50:32 +0000 (23:50 +0100)
These are never modified.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/ieee1394/csr.c
drivers/ieee1394/eth1394.c
drivers/ieee1394/highlevel.c
drivers/ieee1394/highlevel.h
drivers/ieee1394/raw1394.c
drivers/ieee1394/sbp2.c

index c90be4070e40c5097ad3920b1ed4161c1fd87f38..9029b6839f0b8b07737952e70267391dad7e98c6 100644 (file)
@@ -68,22 +68,22 @@ static struct hpsb_highlevel csr_highlevel = {
        .host_reset =   host_reset,
 };
 
-static struct hpsb_address_ops map_ops = {
+const static struct hpsb_address_ops map_ops = {
        .read = read_maps,
 };
 
-static struct hpsb_address_ops fcp_ops = {
+const static struct hpsb_address_ops fcp_ops = {
        .write = write_fcp,
 };
 
-static struct hpsb_address_ops reg_ops = {
+const static struct hpsb_address_ops reg_ops = {
        .read = read_regs,
        .write = write_regs,
        .lock = lock_regs,
        .lock64 = lock64_regs,
 };
 
-static struct hpsb_address_ops config_rom_ops = {
+const static struct hpsb_address_ops config_rom_ops = {
        .read = read_config_rom,
 };
 
index 20128692b3398be1c3a8556e78b593718894bdc1..7ae8bce2756999b22233af001d39801f5a888fc7 100644 (file)
@@ -181,7 +181,7 @@ static void ether1394_remove_host(struct hpsb_host *host);
 static void ether1394_host_reset(struct hpsb_host *host);
 
 /* Function for incoming 1394 packets */
-static struct hpsb_address_ops addr_ops = {
+const static struct hpsb_address_ops addr_ops = {
        .write =        ether1394_write,
 };
 
index 6cc26edcbd8be9581b05ee0e8ef224f250b0f8ff..600e391c8fe7140638dbe0ecf2f2bc1769785445 100644 (file)
@@ -320,7 +320,7 @@ void hpsb_unregister_highlevel(struct hpsb_highlevel *hl)
  */
 u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl,
                                         struct hpsb_host *host,
-                                        struct hpsb_address_ops *ops,
+                                        const struct hpsb_address_ops *ops,
                                         u64 size, u64 alignment,
                                         u64 start, u64 end)
 {
@@ -407,7 +407,8 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl,
  * are automatically deallocated together with the hpsb_highlevel @hl.
  */
 int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
-                           struct hpsb_address_ops *ops, u64 start, u64 end)
+                           const struct hpsb_address_ops *ops,
+                           u64 start, u64 end)
 {
        struct hpsb_address_serve *as;
        struct list_head *lh;
@@ -477,7 +478,7 @@ int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
        return retval;
 }
 
-static struct hpsb_address_ops dummy_ops;
+const static struct hpsb_address_ops dummy_ops;
 
 /* dummy address spaces as lower and upper bounds of the host's a.s. list */
 static void init_hpsb_highlevel(struct hpsb_host *host)
index bc5d0854c17e940c9509009b098cbf9482f6a695..9dba89fc60ada2e1489a60cc950f39a2f170f5b0 100644 (file)
@@ -15,7 +15,7 @@ struct hpsb_host;
 struct hpsb_address_serve {
        struct list_head host_list;     /* per host list */
        struct list_head hl_list;       /* hpsb_highlevel list */
-       struct hpsb_address_ops *op;
+       const struct hpsb_address_ops *op;
        struct hpsb_host *host;
        u64 start;      /* first address handled, quadlet aligned */
        u64 end;        /* first address behind, quadlet aligned */
@@ -119,11 +119,12 @@ void hpsb_unregister_highlevel(struct hpsb_highlevel *hl);
 
 u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl,
                                         struct hpsb_host *host,
-                                        struct hpsb_address_ops *ops,
+                                        const struct hpsb_address_ops *ops,
                                         u64 size, u64 alignment,
                                         u64 start, u64 end);
 int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
-                           struct hpsb_address_ops *ops, u64 start, u64 end);
+                           const struct hpsb_address_ops *ops,
+                           u64 start, u64 end);
 int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
                              u64 start);
 
index bf7e761c12b1c50ba711ade60eef3e003b767a8e..bad66c65b0d64881437afbca88c58c5d403c6437 100644 (file)
@@ -90,7 +90,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store,
 static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store,
                      u64 addr, octlet_t data, octlet_t arg, int ext_tcode,
                      u16 flags);
-static struct hpsb_address_ops arm_ops = {
+const static struct hpsb_address_ops arm_ops = {
        .read = arm_read,
        .write = arm_write,
        .lock = arm_lock,
index a373c18cf7b8fe8bd077c47b0808abea743e573f..ab1034ccb7fb67fbb7c8924f0d188c2a4311e41e 100644 (file)
@@ -265,7 +265,7 @@ static struct hpsb_highlevel sbp2_highlevel = {
        .host_reset     = sbp2_host_reset,
 };
 
-static struct hpsb_address_ops sbp2_ops = {
+const static struct hpsb_address_ops sbp2_ops = {
        .write          = sbp2_handle_status_write
 };
 
@@ -275,7 +275,7 @@ static int sbp2_handle_physdma_write(struct hpsb_host *, int, int, quadlet_t *,
 static int sbp2_handle_physdma_read(struct hpsb_host *, int, quadlet_t *, u64,
                                    size_t, u16);
 
-static struct hpsb_address_ops sbp2_physdma_ops = {
+const static struct hpsb_address_ops sbp2_physdma_ops = {
        .read           = sbp2_handle_physdma_read,
        .write          = sbp2_handle_physdma_write,
 };