[PATCH 4.9 37/90] chardev: add helper function to register char devs with a struct device