log: introduce logtype register macro
[dpdk.git] / drivers / bus / vmbus / vmbus_common.c
index 48a219f..4c9ac33 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "private.h"
 
-int vmbus_logtype_bus;
 extern struct rte_vmbus_bus rte_vmbus_bus;
 
 /* map a particular resource from a file */
@@ -131,7 +130,7 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,
 }
 
 /*
- * IF device class GUID mathces, call the probe function of
+ * If device class GUID matches, call the probe function of
  * registere drivers for the vmbus device.
  * Return -1 if initialization failed,
  * and 1 if no driver found for this device.
@@ -298,10 +297,4 @@ struct rte_vmbus_bus rte_vmbus_bus = {
 };
 
 RTE_REGISTER_BUS(vmbus, rte_vmbus_bus.bus);
-
-RTE_INIT(vmbus_init_log)
-{
-       vmbus_logtype_bus = rte_log_register("bus.vmbus");
-       if (vmbus_logtype_bus >= 0)
-               rte_log_set_level(vmbus_logtype_bus, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(vmbus_logtype_bus, bus.vmbus, NOTICE);