Hi Florian, >> This commit introduces a new module_switch_driver macro, similar to >> module_platform_driver and such, to reduce boilerplate when declaring >> DSA switch drivers. >> >> In order to use the module_driver macro, register_switch_driver needed >> to be changed to return an int instead of void, so make it return 0. > > Do we get much benefit from having this change, the diffstat looks > pretty neutral, ultimately register_switch_driver() might be gone (see: > http://www.spinics.net/lists/netdev/msg326900.html) and mv88e6xxx cannot > be converted to it due to how it is designed. This is not a strong > objection though, the changes look fine to me.
Indeed, I initially introduce the macro for that purpose, I have an RFC ready to remove the mv88e6xxx module and expose its functions, since it'd better be a library instead of a driver. I'll attach it here as a reply to give an idea of what it looks like and get feedback from you. Thanks, -v -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

