Update pm.c

update from sc-02 kernel (same philosophy)