apply_dev(struct lys_deviation *dev, const struct lys_module *module, struct unres_schema *unres)
{
    lys_switch_deviation(dev, module, unres);

    assert(dev->orig_node);
    lys_node_module(dev->orig_node)->deviated = 1; /* main module */
    dev->orig_node->module->deviated = 1;          /* possible submodule */
}
apply_dev(struct lys_deviation *dev, const struct lys_module *module, struct unres_schema *unres)
{
    lys_switch_deviation(dev, module, unres);

    assert(dev->orig_node);
    lys_node_module(dev->orig_node)->deviated = 1;  
    dev->orig_node->module->deviated = 1;           
}