regmap: mdio: Fix regmap_bus pointer constness
authorSander Vanheule <sander@svanheule.net>
Wed, 9 Jun 2021 13:10:03 +0000 (15:10 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 14 Jun 2021 14:00:28 +0000 (15:00 +0100)
commitce62df2290bb86b39f826a835d6060bc3b43dae7
treec9dd3d5adec939bb7734e4e6c119101037fde6ef
parentf083be9db060fbac09123d80bdffb2c001ac0e2b
regmap: mdio: Fix regmap_bus pointer constness

A const qualifier was omitted in the declaration of the regmap_bus
pointer, resulting in the following errors:

drivers/base/regmap/regmap-mdio.c: In function ‘__regmap_init_mdio’:
drivers/base/regmap/regmap-mdio.c:87:7: warning: assignment discards
‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   87 |   bus = &regmap_mdio_c22_bus;
      |       ^
drivers/base/regmap/regmap-mdio.c:89:7: warning: assignment discards
‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   89 |   bus = &regmap_mdio_c45_bus;
      |       ^

Fix this by ensuring the pointer has the same qualifiers as the assigned
values.

Fixes: f083be9db060 ("regmap: mdio: Add clause-45 support")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Link: https://lore.kernel.org/r/f304ca638ffdc66d4803a6df1f75436894bd1d5f.1623244066.git.sander@svanheule.net
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-mdio.c