spi: sirf: account for const type of of_device_id.data
authorJulia Lawall <Julia.Lawall@lip6.fr>
Tue, 2 Jan 2018 13:27:59 +0000 (14:27 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 3 Jan 2018 11:38:46 +0000 (11:38 +0000)
commit9e327ce71f3894e7e6b57f5c15a0dfa5be79f44e
tree25313d0312fc529f1fe7d55016dcbf7e1ea5c212
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323
spi: sirf: account for const type of of_device_id.data

This driver creates various const structures that it stores in the
data field of an of_device_id array.

Adding const to the declaration of the location that receives the
const value from the data field ensures that the compiler will
continue to check that the value is not modified.  Furthermore, the
const-discarding cast on the extraction from the data field is no
longer needed.

Done using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sirf.c