[PATCH 1/2] module: add a function to add module references