Commit ef1a99c6 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller
Browse files

net: mscc: ocelot: fix duplicate driver name error



When compiling a kernel which has both CONFIG_NET_DSA_MSCC_OCELOT_EXT
and CONFIG_MSCC_OCELOT_SWITCH enabled, the following error message will
be printed:

[    5.266588] Error: Driver 'ocelot-switch' is already registered, aborting...

Rename the ocelot_ext.c driver to "ocelot-ext-switch" to avoid the name
duplication, and update the mfd_cell entry for its resources.

Fixes: 3d7316ac ("net: dsa: ocelot: add external ocelot switch control")
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 940af261
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ static const struct mfd_cell vsc7512_devs[] = {
		.num_resources = ARRAY_SIZE(vsc7512_miim1_resources),
		.resources = vsc7512_miim1_resources,
	}, {
		.name = "ocelot-switch",
		.name = "ocelot-ext-switch",
		.of_compatible = "mscc,vsc7512-switch",
		.num_resources = ARRAY_SIZE(vsc7512_switch_resources),
		.resources = vsc7512_switch_resources,
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ MODULE_DEVICE_TABLE(of, ocelot_ext_switch_of_match);

static struct platform_driver ocelot_ext_switch_driver = {
	.driver = {
		.name = "ocelot-switch",
		.name = "ocelot-ext-switch",
		.of_match_table = of_match_ptr(ocelot_ext_switch_of_match),
	},
	.probe = ocelot_ext_probe,