Skip to content

Commit b65b24d

Browse files
montjoiedavem330
authored andcommitted
atm: fore200e: Do not drop const qualifier
The data member of structure firmware is const and this constness is dropped by some cast. This patch add some const for keeping the const information. Signed-off-by: LABBE Corentin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f1c89c0 commit b65b24d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/atm/fore200e.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,7 +2489,7 @@ static int fore200e_load_and_start_fw(struct fore200e *fore200e)
24892489
{
24902490
const struct firmware *firmware;
24912491
struct device *device;
2492-
struct fw_header *fw_header;
2492+
const struct fw_header *fw_header;
24932493
const __le32 *fw_data;
24942494
u32 fw_size;
24952495
u32 __iomem *load_addr;
@@ -2511,9 +2511,9 @@ static int fore200e_load_and_start_fw(struct fore200e *fore200e)
25112511
return err;
25122512
}
25132513

2514-
fw_data = (__le32 *) firmware->data;
2514+
fw_data = (const __le32 *)firmware->data;
25152515
fw_size = firmware->size / sizeof(u32);
2516-
fw_header = (struct fw_header *) firmware->data;
2516+
fw_header = (const struct fw_header *)firmware->data;
25172517
load_addr = fore200e->virt_base + le32_to_cpu(fw_header->load_offset);
25182518

25192519
DPRINTK(2, "device %s firmware being loaded at 0x%p (%d words)\n",

0 commit comments

Comments
 (0)