The comment in gpio_mockup_new() says we can deal with gpio-mockup
already being loaded, but it's wrong - we'd actually fail in the call
to kmod_module_probe_insert_module().
Pass the KMOD_PROBE_IGNORE_LOADED flag to the insert function to fix
that.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
* Then see if we can freely load and unload it. If it's already
* loaded - no problem, we'll remove it next anyway.
*/
- rv = kmod_module_probe_insert_module(ctx->module, 0,
+ rv = kmod_module_probe_insert_module(ctx->module,
+ KMOD_PROBE_IGNORE_LOADED,
"gpio_mockup_ranges=-1,4",
NULL, NULL, NULL);
if (rv)