[PATCH 2/2] ath79: mikrotik: Change the moment of routerboot partition parser init
Thibaut
hacks at slashdirt.org
Fri Nov 12 09:37:54 PST 2021
> Le 12 nov. 2021 à 16:25, Denis K <denis281089 at gmail.com> a écrit :
>
>> OK, let’s do that as a workaround and hope that deferred probes won’t overlap past late_initcall()
> What about using register_mtd_user function: routerboot can call
> rb_hardconfig_init and rb_softconfig_init when mtd subsystem notifies
> it about a new mtd device? It works.
Looks like a good idea, I should have thought about it ;)
My only nit is that the _init() calls will be executed with the MTD table mutex held, but I suppose it’s acceptable.
However please do not remove the comments I left in the code. Furthermore, for the sake of consistency the module should also react to the (arguably unlikely) removal of the target MTD partitions: a .remove() callback will deal with that. Finally the inclusion of mtd/mtd.h is not necessary in the routerboot.h header (we’re using pointers and that header has no dependency on mtd).
I have amended your patch to reflect the above comments, and adjusted the commit message.
Can you confirm this still works for you? I cannot test it myself now.
Thanks,
T
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-generic-platform-mikrotik-use-MTD-notifier.patch
Type: application/octet-stream
Size: 7025 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20211112/b9d154e6/attachment.obj>
More information about the openwrt-devel
mailing list