Avoid C-style cast warnings

hardware/libhardware/include was being included with -isystem, which
hides warnings.  Use a macro to convert modules to hw_device_t** to call
the open function that works in C++ and C.

Bug: 32018017
Test: m -j
Change-Id: If68bf15581975f1217fcab366cef7bc784894641
diff --git a/include/hardware/vibrator.h b/include/hardware/vibrator.h
index 200adf0..361085f 100644
--- a/include/hardware/vibrator.h
+++ b/include/hardware/vibrator.h
@@ -65,7 +65,7 @@
 
 static inline int vibrator_open(const struct hw_module_t* module, vibrator_device_t** device)
 {
-    return module->methods->open(module, VIBRATOR_DEVICE_ID_MAIN, (struct hw_device_t**)device);
+    return module->methods->open(module, VIBRATOR_DEVICE_ID_MAIN, TO_HW_DEVICE_T_OPEN(device));
 }
 
 __END_DECLS