m4: use hw_get_module_by_class

Change-Id: Ie9b8b2f7920bc56cec7c289033045ee9c73a0ec9