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

phy: cadence: torrent: Constify regmap_config structs

The regmap_config structs are never modified and can be made const to
allow the compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200912204639.501669-4-rikard.falkeborn@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Rikard Falkeborn and committed by
Vinod Koul
57d39c76 2f4a3d8b

+6 -6
+6 -6
drivers/phy/cadence/phy-cadence-torrent.c
··· 331 331 .reg_read = cdns_regmap_read, \ 332 332 } 333 333 334 - static struct regmap_config cdns_torrent_tx_lane_cdb_config[] = { 334 + static const struct regmap_config cdns_torrent_tx_lane_cdb_config[] = { 335 335 TORRENT_TX_LANE_CDB_REGMAP_CONF("0"), 336 336 TORRENT_TX_LANE_CDB_REGMAP_CONF("1"), 337 337 TORRENT_TX_LANE_CDB_REGMAP_CONF("2"), 338 338 TORRENT_TX_LANE_CDB_REGMAP_CONF("3"), 339 339 }; 340 340 341 - static struct regmap_config cdns_torrent_rx_lane_cdb_config[] = { 341 + static const struct regmap_config cdns_torrent_rx_lane_cdb_config[] = { 342 342 TORRENT_RX_LANE_CDB_REGMAP_CONF("0"), 343 343 TORRENT_RX_LANE_CDB_REGMAP_CONF("1"), 344 344 TORRENT_RX_LANE_CDB_REGMAP_CONF("2"), 345 345 TORRENT_RX_LANE_CDB_REGMAP_CONF("3"), 346 346 }; 347 347 348 - static struct regmap_config cdns_torrent_common_cdb_config = { 348 + static const struct regmap_config cdns_torrent_common_cdb_config = { 349 349 .name = "torrent_common_cdb", 350 350 .reg_stride = 1, 351 351 .fast_io = true, ··· 353 353 .reg_read = cdns_regmap_read, 354 354 }; 355 355 356 - static struct regmap_config cdns_torrent_phy_pcs_cmn_cdb_config = { 356 + static const struct regmap_config cdns_torrent_phy_pcs_cmn_cdb_config = { 357 357 .name = "torrent_phy_pcs_cmn_cdb", 358 358 .reg_stride = 1, 359 359 .fast_io = true, ··· 361 361 .reg_read = cdns_regmap_read, 362 362 }; 363 363 364 - static struct regmap_config cdns_torrent_phy_pma_cmn_cdb_config = { 364 + static const struct regmap_config cdns_torrent_phy_pma_cmn_cdb_config = { 365 365 .name = "torrent_phy_pma_cmn_cdb", 366 366 .reg_stride = 1, 367 367 .fast_io = true, ··· 369 369 .reg_read = cdns_regmap_read, 370 370 }; 371 371 372 - static struct regmap_config cdns_torrent_dptx_phy_config = { 372 + static const struct regmap_config cdns_torrent_dptx_phy_config = { 373 373 .name = "torrent_dptx_phy", 374 374 .reg_stride = 1, 375 375 .fast_io = true,