Skip to content

Commit 9ae0f26

Browse files
ColinIanKinggregkh
authored andcommitted
usb: r8a66597-hcd: make read-only const arrays static
Don't populate the read-only const arrays fifoaddr, fifosel and fifoctr on the stack at run time, instead make them static. Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7fa6b25 commit 9ae0f26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/usb/host/r8a66597-hcd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ static void put_child_connect_map(struct r8a66597 *r8a66597, int address)
297297
static void set_pipe_reg_addr(struct r8a66597_pipe *pipe, u8 dma_ch)
298298
{
299299
u16 pipenum = pipe->info.pipenum;
300-
const unsigned long fifoaddr[] = {D0FIFO, D1FIFO, CFIFO};
301-
const unsigned long fifosel[] = {D0FIFOSEL, D1FIFOSEL, CFIFOSEL};
302-
const unsigned long fifoctr[] = {D0FIFOCTR, D1FIFOCTR, CFIFOCTR};
300+
static const unsigned long fifoaddr[] = {D0FIFO, D1FIFO, CFIFO};
301+
static const unsigned long fifosel[] = {D0FIFOSEL, D1FIFOSEL, CFIFOSEL};
302+
static const unsigned long fifoctr[] = {D0FIFOCTR, D1FIFOCTR, CFIFOCTR};
303303

304304
if (dma_ch > R8A66597_PIPE_NO_DMA) /* dma fifo not use? */
305305
dma_ch = R8A66597_PIPE_NO_DMA;

0 commit comments

Comments
 (0)