From: Hans Verkuil Date: Mon, 10 Feb 2014 11:08:43 +0000 (-0300) Subject: [media] radio-usb-si4713: make array of structs const X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ab3cacf6d92b0c0b4b5c8817b8988dc67a6397ac;p=openwrt%2Fstaging%2Fblogic.git [media] radio-usb-si4713: make array of structs const The start_seq[] should be const. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/radio/si4713/radio-usb-si4713.c b/drivers/media/radio/si4713/radio-usb-si4713.c index 779855b74bcd..86502b2786d0 100644 --- a/drivers/media/radio/si4713/radio-usb-si4713.c +++ b/drivers/media/radio/si4713/radio-usb-si4713.c @@ -223,7 +223,7 @@ struct si4713_start_seq_table { * (0x03): Get serial number of the board (Response : CB000-00-00) * (0x06, 0x03, 0x03, 0x08, 0x01, 0x0f) : Get Component revision */ -static struct si4713_start_seq_table start_seq[] = { +static const struct si4713_start_seq_table start_seq[] = { { 1, { 0x03 } }, { 2, { 0x32, 0x7f } }, @@ -261,7 +261,7 @@ static int si4713_start_seq(struct si4713_usb_device *radio) for (i = 0; i < ARRAY_SIZE(start_seq); i++) { int len = start_seq[i].len; - u8 *payload = start_seq[i].payload; + const u8 *payload = start_seq[i].payload; memcpy(radio->buffer + 1, payload, len); memset(radio->buffer + len + 1, 0, BUFFER_LENGTH - 1 - len);