Skip to content

Commit ef1a99c

Browse files
vladimirolteandavem330
authored andcommitted
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: 3d7316a ("net: dsa: ocelot: add external ocelot switch control") Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 940af26 commit ef1a99c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/mfd/ocelot-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static const struct mfd_cell vsc7512_devs[] = {
177177
.num_resources = ARRAY_SIZE(vsc7512_miim1_resources),
178178
.resources = vsc7512_miim1_resources,
179179
}, {
180-
.name = "ocelot-switch",
180+
.name = "ocelot-ext-switch",
181181
.of_compatible = "mscc,vsc7512-switch",
182182
.num_resources = ARRAY_SIZE(vsc7512_switch_resources),
183183
.resources = vsc7512_switch_resources,

drivers/net/dsa/ocelot/ocelot_ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ MODULE_DEVICE_TABLE(of, ocelot_ext_switch_of_match);
149149

150150
static struct platform_driver ocelot_ext_switch_driver = {
151151
.driver = {
152-
.name = "ocelot-switch",
152+
.name = "ocelot-ext-switch",
153153
.of_match_table = of_match_ptr(ocelot_ext_switch_of_match),
154154
},
155155
.probe = ocelot_ext_probe,

0 commit comments

Comments
 (0)