Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rapidio: constify rio_device_id

rio_device_id are not supposed to change at runtime. rio driver is
working with const 'id_table'. So mark the non-const rio_device_id
structs as const.

Link: http://lkml.kernel.org/r/1503734627-6058-2-git-send-email-arvind.yadav.cs@gmail.com
Link: http://lkml.kernel.org/r/1503734627-6058-3-git-send-email-arvind.yadav.cs@gmail.com
Link: http://lkml.kernel.org/r/1503734627-6058-4-git-send-email-arvind.yadav.cs@gmail.com
Link: http://lkml.kernel.org/r/1503734627-6058-5-git-send-email-arvind.yadav.cs@gmail.com
Link: http://lkml.kernel.org/r/1503734627-6058-6-git-send-email-arvind.yadav.cs@gmail.com
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Arvind Yadav and committed by
Linus Torvalds
c1b1418a de40ccef

+5 -5
+1 -1
drivers/rapidio/switches/idt_gen2.c
··· 458 458 idtg2_sysfs(rdev, false); 459 459 } 460 460 461 - static struct rio_device_id idtg2_id_table[] = { 461 + static const struct rio_device_id idtg2_id_table[] = { 462 462 {RIO_DEVICE(RIO_DID_IDTCPS1848, RIO_VID_IDT)}, 463 463 {RIO_DEVICE(RIO_DID_IDTCPS1616, RIO_VID_IDT)}, 464 464 {RIO_DEVICE(RIO_DID_IDTVPS1616, RIO_VID_IDT)},
+1 -1
drivers/rapidio/switches/idt_gen3.c
··· 348 348 } 349 349 } 350 350 351 - static struct rio_device_id idtg3_id_table[] = { 351 + static const struct rio_device_id idtg3_id_table[] = { 352 352 {RIO_DEVICE(RIO_DID_IDTRXS1632, RIO_VID_IDT)}, 353 353 {RIO_DEVICE(RIO_DID_IDTRXS2448, RIO_VID_IDT)}, 354 354 { 0, } /* terminate list */
+1 -1
drivers/rapidio/switches/idtcps.c
··· 168 168 spin_unlock(&rdev->rswitch->lock); 169 169 } 170 170 171 - static struct rio_device_id idtcps_id_table[] = { 171 + static const struct rio_device_id idtcps_id_table[] = { 172 172 {RIO_DEVICE(RIO_DID_IDTCPS6Q, RIO_VID_IDT)}, 173 173 {RIO_DEVICE(RIO_DID_IDTCPS8, RIO_VID_IDT)}, 174 174 {RIO_DEVICE(RIO_DID_IDTCPS10Q, RIO_VID_IDT)},
+1 -1
drivers/rapidio/switches/tsi568.c
··· 169 169 spin_unlock(&rdev->rswitch->lock); 170 170 } 171 171 172 - static struct rio_device_id tsi568_id_table[] = { 172 + static const struct rio_device_id tsi568_id_table[] = { 173 173 {RIO_DEVICE(RIO_DID_TSI568, RIO_VID_TUNDRA)}, 174 174 { 0, } /* terminate list */ 175 175 };
+1 -1
drivers/rapidio/switches/tsi57x.c
··· 336 336 spin_unlock(&rdev->rswitch->lock); 337 337 } 338 338 339 - static struct rio_device_id tsi57x_id_table[] = { 339 + static const struct rio_device_id tsi57x_id_table[] = { 340 340 {RIO_DEVICE(RIO_DID_TSI572, RIO_VID_TUNDRA)}, 341 341 {RIO_DEVICE(RIO_DID_TSI574, RIO_VID_TUNDRA)}, 342 342 {RIO_DEVICE(RIO_DID_TSI577, RIO_VID_TUNDRA)},