util: split get_maj_min() out from dev_open()